1. Introduction
This document contains generated documentation for Dev3 blockchain-api-service
. Blockchain API service provides
endpoints to verify user wallet ownership as well as endpoints to fetch data from blockchain for verified wallets.
Source code is available on Github.
Base API URL is
Internal API documentation which requires JWT authorization can be
2. Project API
All endpoints are public and do not require Authorization: Bearer JWT
header.
The rest of the project API endpoints are described in the internal API docs.
2.1. Fetch Project by API Key
Fetches project by API key.
This request requires an API key present in the X-API-KEY
header.
Request Example
GET /v1/projects/by-api-key HTTP/1.1
X-API-KEY: api-key
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: da1650d5-49fb-42c6-be01-4c10ff3ec39b
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 336
{
"id" : "7b188f75-408e-4872-b017-271e94f5c65b",
"owner_id" : "6856db4a-9b3f-402d-87e2-d1df59878ab5",
"issuer_contract_address" : "0x000000000000000000000000000000000000000a",
"base_redirect_url" : "base-redirect-url",
"chain_id" : 31337,
"custom_rpc_url" : "custom-rpc-url",
"created_at" : "2024-02-23T12:17:15.610847Z"
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"base_redirect_url" : {
"type" : "string"
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"custom_rpc_url" : {
"type" : [ "string", "null" ]
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"issuer_contract_address" : {
"type" : "string"
},
"owner_id" : {
"type" : "string",
"format" : "uuid"
}
}
}
3. Wallet Authorization API
All endpoints are public and do not require Authorization: Bearer JWT
header.
3.1. Create Wallet Authorization Request
Creates wallet authorization request with specified parameters. Parameters redirect_url
, message_to_sign
,
store_indefinitely
, wallet_address
, arbitrary_data
, screen_config
and all its child fields are optional.
arbitrary_data
field can contain any desired JSON value. Wallet authorization request ID can be interpolated into the
redirect_url
by placing ${id}
placeholder in the place where request ID is desired in the URL. The placeholder must
strictly have dollar sign and brackets to be interpolated, and only id
field can be interpolated.
If message_to_sign
field is not set, then the message will be generated on backend. store_indefinitely
field
determines if the request should be readable only once. If it is not provided in the request, it will be set to true
.
This request requires an API key present in the X-API-KEY
header.
Request Example
POST /v1/wallet-authorization HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 296
Host: localhost:8080
{
"redirect_url" : "https://custom-url/${id}",
"wallet_address" : "0x000000000000000000000000000000000000000a",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 96c390be-1259-46c8-b385-08c611588549
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 628
{
"id" : "54f97bb8-1dc5-4e28-a5de-edd0a6443342",
"project_id" : "73514659-7b36-48e0-8609-154b6fa0e5e9",
"status" : "PENDING",
"redirect_url" : "https://custom-url/54f97bb8-1dc5-4e28-a5de-edd0a6443342",
"wallet_address" : "0x000000000000000000000000000000000000000a",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"message_to_sign" : "Authorization message ID to sign: 54f97bb8-1dc5-4e28-a5de-edd0a6443342",
"signed_message" : null,
"created_at" : "2024-02-23T12:16:24.174126Z"
}
Schemas:
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"message_to_sign" : {
"type" : [ "string", "null" ]
},
"redirect_url" : {
"type" : [ "string", "null" ]
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"store_indefinitely" : {
"type" : [ "boolean", "null" ]
},
"wallet_address" : {
"type" : [ "string", "null" ]
}
}
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"message_to_sign" : {
"type" : "string"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"signed_message" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"wallet_address" : {
"type" : [ "string", "null" ]
}
}
}
3.2. Fetch Wallet Authorization Request by ID
Fetches stored wallet authorization request with its current status. The request is considered successful if the
attached signed message is valid and was signed by wallet_address
. If wallet_address
was not specified when the
request was created, then any valid signature will be accepted. For pending requests, signed_message
field will always
be null
. If the signed message is invalid or does not match specified wallet_address
, request will be considered as
failed. If the request was crated with store_indefinitely
field set to false
, the the request will be deleted after
the first time it is fetched by ID.
Request Example
GET /v1/wallet-authorization/7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 339c54d3-3988-4aee-a2df-910e5c46a1fe
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 758
{
"id" : "7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
"project_id" : "73514659-7b36-48e0-8609-154b6fa0e5e9",
"status" : "SUCCESS",
"redirect_url" : "https://example.com/7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
"wallet_address" : "0x865f603f42ca1231e5b5f90e15663b0fe19f0b21",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"message_to_sign" : "Authorization message ID to sign: 7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
"signed_message" : "0xcf6025b67228271aaed15b17d42d6258e3b47ad5dcd27088a81b2f36b9d7ff5d2d133a652297bc19bea94d10750076fbdc529ab03540e2ea6be02903645a98531b",
"created_at" : "2024-02-23T12:16:24.56956Z"
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"message_to_sign" : {
"type" : "string"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"signed_message" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"wallet_address" : {
"type" : [ "string", "null" ]
}
}
}
3.3. Fetch Wallet Authorization Requests by Project ID
Fetches stored wallet authorization requests with their current status filtered by project ID.
Request Example
GET /v1/wallet-authorization/by-project/73514659-7b36-48e0-8609-154b6fa0e5e9 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 89630c37-0bc2-45f5-9e8b-fec27dd0c57a
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 814
{
"requests" : [ {
"id" : "7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
"project_id" : "73514659-7b36-48e0-8609-154b6fa0e5e9",
"status" : "SUCCESS",
"redirect_url" : "https://example.com/7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
"wallet_address" : "0x865f603f42ca1231e5b5f90e15663b0fe19f0b21",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"message_to_sign" : "Authorization message ID to sign: 7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
"signed_message" : "0xcf6025b67228271aaed15b17d42d6258e3b47ad5dcd27088a81b2f36b9d7ff5d2d133a652297bc19bea94d10750076fbdc529ab03540e2ea6be02903645a98531b",
"created_at" : "2024-02-23T12:16:24.407312Z"
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"requests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"message_to_sign" : {
"type" : "string"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"signed_message" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"wallet_address" : {
"type" : [ "string", "null" ]
}
}
}
}
}
}
3.4. Attach Wallet Address and Signed Message to Wallet Authorization Request
Attaches wallet address and signed message to existing wallet authorization request. Once the wallet address and signed message are attached to the request, any subsequent attempts to attach new values will fail.
Request Example
PUT /v1/wallet-authorization/3ebc587f-3c90-4b71-acce-d915d7acece9 HTTP/1.1
Content-Type: application/json
Content-Length: 108
Host: localhost:8080
{
"wallet_address" : "0x000000000000000000000000000000000000000c",
"signed_message" : "signed-message"
}
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"signed_message" : {
"type" : "string"
},
"wallet_address" : {
"type" : "string"
}
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 241c1577-5497-432b-a302-64291d7e008f
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
4. Asset Balance Checking API
All endpoints are public and do not require Authorization: Bearer JWT
header.
4.1. Create Asset Balance Check Request
Creates asset balance request with specified parameters. Parameters redirect_url
, block_number
, wallet_address
,
arbitrary_data
, screen_config
and all its child fields are optional. arbitrary_data
field can contain any desired
JSON value. Balance check request ID can be interpolated into the redirect_url
by placing ${id}
placeholder in the
place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be
interpolated, and only id
field can be interpolated.
If asset_type
is set to NATIVE
, then chain-native currency balance will be checked (i.e. Ether) and then
token_address
must not be present. If asset_type
is set to TOKEN
, then token_address
must be present.
This request requires an API key present in the X-API-KEY
header.
Request Example
POST /v1/balance HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 413
Host: localhost:8080
{
"redirect_url" : "https://custom-url/${id}",
"token_address" : "0x00000000000000000000000000000000cafebabe",
"asset_type" : "TOKEN",
"block_number" : "10",
"wallet_address" : "0x000000000000000000000000000000000000000a",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: de8c9f11-206d-41c1-afcb-5edc7e21eb0f
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 786
{
"id" : "6ca59bdd-320a-4762-9b9a-f431a1cba569",
"project_id" : "81ea8997-b701-4008-abf8-bc79d740ba0f",
"status" : "PENDING",
"chain_id" : 31337,
"redirect_url" : "https://custom-url/6ca59bdd-320a-4762-9b9a-f431a1cba569",
"token_address" : "0x00000000000000000000000000000000cafebabe",
"asset_type" : "TOKEN",
"block_number" : "10",
"wallet_address" : "0x000000000000000000000000000000000000000a",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"balance" : null,
"message_to_sign" : "Verification message ID to sign: 6ca59bdd-320a-4762-9b9a-f431a1cba569",
"signed_message" : null,
"created_at" : "2024-02-23T12:16:09.566928Z"
}
Schemas:
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"block_number" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"redirect_url" : {
"type" : [ "string", "null" ]
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"token_address" : {
"type" : [ "string", "null" ]
},
"wallet_address" : {
"type" : [ "string", "null" ]
}
}
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"balance" : {
"type" : [ "object", "null" ],
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"block_number" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"timestamp" : {
"type" : "string",
"format" : "date-time"
},
"wallet" : {
"type" : "string"
}
}
},
"block_number" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"message_to_sign" : {
"type" : "string"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"signed_message" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"token_address" : {
"type" : [ "string", "null" ]
},
"wallet_address" : {
"type" : [ "string", "null" ]
}
}
}
4.2. Fetch Asset Balance Check Request by ID
Fetches stored asset balance check request with its current status. The request is considered successful if the attached
signed message is valid and was signed by wallet_address
. If wallet_address
was not specified when the request was
created, then any valid signature will be accepted. For successful requests, balance
field will contain info about
requested asset balance. For pending requests, balance
and signed_message
fields will always be null
. If the
signed message is invalid or does not match specified wallet_address
, request will be considered as failed. If
block_number
was specified during request creation, then asset balance will be fetched only for that block number, and
if block_number
was not specified then the latest asset balance will be fetched every time this resource is requested.
Request Example
GET /v1/balance/7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 2cd7f543-9594-42b6-ae8d-ce59de14c661
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1069
{
"id" : "7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
"project_id" : "81ea8997-b701-4008-abf8-bc79d740ba0f",
"status" : "SUCCESS",
"chain_id" : 31337,
"redirect_url" : "https://example.com/7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
"token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"asset_type" : "TOKEN",
"block_number" : "1",
"wallet_address" : "0x865f603f42ca1231e5b5f90e15663b0fe19f0b21",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"balance" : {
"wallet" : "0x865f603f42ca1231e5b5f90e15663b0fe19f0b21",
"block_number" : "1",
"timestamp" : "2024-02-23T12:15:49Z",
"amount" : "10000"
},
"message_to_sign" : "Verification message ID to sign: 7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
"signed_message" : "0xfc90c8aa9f2164234b8826144d8ecfc287b5d7c168d0e9d284baf76dbef55c4c5761cf46e34b7cdb72cc97f1fb1c19f315ee7a430dd6111fa6c693b41c96c5501c",
"created_at" : "2024-02-23T12:16:09.743213Z"
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"balance" : {
"type" : [ "object", "null" ],
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"block_number" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"timestamp" : {
"type" : "string",
"format" : "date-time"
},
"wallet" : {
"type" : "string"
}
}
},
"block_number" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"message_to_sign" : {
"type" : "string"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"signed_message" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"token_address" : {
"type" : [ "string", "null" ]
},
"wallet_address" : {
"type" : [ "string", "null" ]
}
}
}
4.3. Fetch Asset Balance Check Requests by Project ID
Fetches stored asset balance check requests with their current status filtered by project ID.
Request Example
GET /v1/balance/by-project/81ea8997-b701-4008-abf8-bc79d740ba0f HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 796c9107-8d2d-4fff-97e6-69763d0b2650
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1144
{
"requests" : [ {
"id" : "7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
"project_id" : "81ea8997-b701-4008-abf8-bc79d740ba0f",
"status" : "SUCCESS",
"chain_id" : 31337,
"redirect_url" : "https://example.com/7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
"token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"asset_type" : "TOKEN",
"block_number" : "1",
"wallet_address" : "0x865f603f42ca1231e5b5f90e15663b0fe19f0b21",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"balance" : {
"wallet" : "0x865f603f42ca1231e5b5f90e15663b0fe19f0b21",
"block_number" : "1",
"timestamp" : "2024-02-23T12:15:49Z",
"amount" : "10000"
},
"message_to_sign" : "Verification message ID to sign: 7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
"signed_message" : "0xfc90c8aa9f2164234b8826144d8ecfc287b5d7c168d0e9d284baf76dbef55c4c5761cf46e34b7cdb72cc97f1fb1c19f315ee7a430dd6111fa6c693b41c96c5501c",
"created_at" : "2024-02-23T12:16:08.045162Z"
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"requests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"balance" : {
"type" : [ "object", "null" ],
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"block_number" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"timestamp" : {
"type" : "string",
"format" : "date-time"
},
"wallet" : {
"type" : "string"
}
}
},
"block_number" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"message_to_sign" : {
"type" : "string"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"signed_message" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"token_address" : {
"type" : [ "string", "null" ]
},
"wallet_address" : {
"type" : [ "string", "null" ]
}
}
}
}
}
}
4.4. Attach Wallet Address and Signed Message to Asset Balance Check Request
Attaches wallet address and signed message to existing asset balance check request. Once the wallet address and signed message are attached to the request, any subsequent attempts to attach new values will fail.
Request Example
PUT /v1/balance/fe284862-ed2a-4061-8dd8-f823089be17f HTTP/1.1
Content-Type: application/json
Content-Length: 108
Host: localhost:8080
{
"wallet_address" : "0x000000000000000000000000000000000000000c",
"signed_message" : "signed-message"
}
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"signed_message" : {
"type" : "string"
},
"wallet_address" : {
"type" : "string"
}
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 6663f20b-4e14-4573-a7ff-804f944b27a3
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
5. Asset Send Request API
All endpoints are public and do not require Authorization: Bearer JWT
header.
5.1. Create Asset Send Request
Creates asset send request with specified parameters. Parameters redirect_url
, sender_address
, arbitrary_data
,
screen_config
and all its child fields are optional. arbitrary_data
field can contain any desired JSON value. Send
request ID can be interpolated into the redirect_url
by placing ${id}
placeholder in the place where request ID is
desired in the URL. The placeholder must strictly have dollar sign and brackets to be interpolated, and only id
field
can be interpolated.
If asset_type
is set to NATIVE
, then chain-native currency will be send (i.e. Ether) and then token_address
must
not be present. If asset_type
is set to TOKEN
, then token_address
must be present.
This request requires an API key present in the X-API-KEY
header.
Request Example
POST /v1/send HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 477
Host: localhost:8080
{
"redirect_url" : "https://custom-url/${id}",
"token_address" : "0x00000000000000000000000000000000cafebabe",
"asset_type" : "TOKEN",
"amount" : "10",
"sender_address" : "0x000000000000000000000000000000000000000b",
"recipient_address" : "0x000000000000000000000000000000000000000c",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 2df67e15-c203-4a75-b8f9-1cbb349357bb
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1159
{
"id" : "396a336d-6f06-45e8-beb7-32fe3c35ea9d",
"project_id" : "d81ae911-75ae-4922-bb4a-7ca3eb2a53c4",
"status" : "PENDING",
"chain_id" : 31337,
"token_address" : "0x00000000000000000000000000000000cafebabe",
"asset_type" : "TOKEN",
"amount" : "10",
"sender_address" : "0x000000000000000000000000000000000000000b",
"recipient_address" : "0x000000000000000000000000000000000000000c",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"redirect_url" : "https://custom-url/396a336d-6f06-45e8-beb7-32fe3c35ea9d",
"send_tx" : {
"tx_hash" : null,
"from" : "0x000000000000000000000000000000000000000b",
"to" : "0x00000000000000000000000000000000cafebabe",
"data" : "0xa9059cbb000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : null,
"timestamp" : null,
"raw_rpc_transaction_receipt" : null
},
"created_at" : "2024-02-23T12:16:18.668168Z",
"events" : null
}
Schemas:
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"recipient_address" : {
"type" : "string"
},
"redirect_url" : {
"type" : [ "string", "null" ]
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"token_address" : {
"type" : [ "string", "null" ]
}
}
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"recipient_address" : {
"type" : "string"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"send_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"token_address" : {
"type" : [ "string", "null" ]
}
}
}
5.2. Fetch Asset Send Request by ID
Fetches stored asset send request with its current status. The request is considered successful if the attached
transaction is confirmed on blockchain and all its data matches specified request parameters (correct to
and from
addresses, amount
, matching data
and tx_hash
). If there are any mismatches between specified request data and
state on blockchain, the request will be marked as failed. If there is no attached transaction hash or if transaction
for attached hash is not yet mined on blockchain, request will be in pending state.
Request Example
GET /v1/send/a9ceeff3-3875-46e9-a5af-92dbacce4d90 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 6f24df28-3011-4931-bc06-908da2accce0
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3608
{
"id" : "a9ceeff3-3875-46e9-a5af-92dbacce4d90",
"project_id" : "d81ae911-75ae-4922-bb4a-7ca3eb2a53c4",
"status" : "SUCCESS",
"chain_id" : 31337,
"token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"asset_type" : "TOKEN",
"amount" : "10",
"sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"recipient_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"redirect_url" : "https://example.com/request-send/a9ceeff3-3875-46e9-a5af-92dbacce4d90/action",
"send_tx" : {
"tx_hash" : "0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0xa9059cbb0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:50Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3\",\"transactionIndex\":0,\"blockHash\":\"0x34773f12823863101e21e48ebcb6ee87950fab8077beba4070f29d34c78032d4\",\"blockNumber\":2,\"cumulativeGasUsed\":51525,\"gasUsed\":51525,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3\",\"blockHash\":\"0x34773f12823863101e21e48ebcb6ee87950fab8077beba4070f29d34c78032d4\",\"blockNumber\":2,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"0x0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000008002000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000010000000000000000000000000000008000000000000200000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000800000002000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000200000000000000000000000000\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0xc945\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"cumulativeGasUsedRaw\":\"0xc945\"}"
},
"created_at" : "2024-02-23T12:16:20.185373Z",
"events" : [ {
"signature" : "Transfer(address,address,uint256)",
"arguments" : [ {
"name" : "from",
"type" : "VALUE",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"hash" : null
}, {
"name" : "to",
"type" : "VALUE",
"value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"recipient_address" : {
"type" : "string"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"send_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"token_address" : {
"type" : [ "string", "null" ]
}
}
}
5.3. Fetch Asset Send Requests by Project ID
Fetches stored asset send requests with their current status filtered by project ID.
Request Example
GET /v1/send/by-project/d81ae911-75ae-4922-bb4a-7ca3eb2a53c4 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 323d53fd-f5e5-4e00-8485-b7cc4a612f55
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3726
{
"requests" : [ {
"id" : "b8494f15-b76c-4f3e-9dcd-3688cae813b2",
"project_id" : "d81ae911-75ae-4922-bb4a-7ca3eb2a53c4",
"status" : "SUCCESS",
"chain_id" : 31337,
"token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"asset_type" : "TOKEN",
"amount" : "10",
"sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"recipient_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"redirect_url" : "https://example.com/request-send/b8494f15-b76c-4f3e-9dcd-3688cae813b2/action",
"send_tx" : {
"tx_hash" : "0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0xa9059cbb0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:50Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3\",\"transactionIndex\":0,\"blockHash\":\"0xa930f22df7563f431d34fbe661e265c3a4328833d438d2d51a3cd3993eebb46a\",\"blockNumber\":2,\"cumulativeGasUsed\":51525,\"gasUsed\":51525,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3\",\"blockHash\":\"0xa930f22df7563f431d34fbe661e265c3a4328833d438d2d51a3cd3993eebb46a\",\"blockNumber\":2,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"0x0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000008002000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000010000000000000000000000000000008000000000000200000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000800000002000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000200000000000000000000000000\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0xc945\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"cumulativeGasUsedRaw\":\"0xc945\"}"
},
"created_at" : "2024-02-23T12:16:19.21795Z",
"events" : [ {
"signature" : "Transfer(address,address,uint256)",
"arguments" : [ {
"name" : "from",
"type" : "VALUE",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"hash" : null
}, {
"name" : "to",
"type" : "VALUE",
"value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"requests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"recipient_address" : {
"type" : "string"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"send_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"token_address" : {
"type" : [ "string", "null" ]
}
}
}
}
}
}
5.4. Fetch Asset Send Requests by Sender Address
Fetches stored asset send requests with their current status filtered by sender address which was specified at the moment of request creation (if specified) or attached along with transaction info (if not specified during request creation).
Request Example
GET /v1/send/by-sender/0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 69768054-6b09-441f-98f9-0f0473bce60a
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3727
{
"requests" : [ {
"id" : "b18fc881-3f58-42f9-8432-46d35fb6eb9b",
"project_id" : "d81ae911-75ae-4922-bb4a-7ca3eb2a53c4",
"status" : "SUCCESS",
"chain_id" : 31337,
"token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"asset_type" : "TOKEN",
"amount" : "10",
"sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"recipient_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"redirect_url" : "https://example.com/request-send/b18fc881-3f58-42f9-8432-46d35fb6eb9b/action",
"send_tx" : {
"tx_hash" : "0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0xa9059cbb0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:50Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3\",\"transactionIndex\":0,\"blockHash\":\"0x6de73b52de22de0781796dd1410b7e6e3b839d5635d1740632260a40f265b33c\",\"blockNumber\":2,\"cumulativeGasUsed\":51525,\"gasUsed\":51525,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3\",\"blockHash\":\"0x6de73b52de22de0781796dd1410b7e6e3b839d5635d1740632260a40f265b33c\",\"blockNumber\":2,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"0x0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000008002000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000010000000000000000000000000000008000000000000200000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000800000002000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000200000000000000000000000000\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0xc945\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"cumulativeGasUsedRaw\":\"0xc945\"}"
},
"created_at" : "2024-02-23T12:16:20.400487Z",
"events" : [ {
"signature" : "Transfer(address,address,uint256)",
"arguments" : [ {
"name" : "from",
"type" : "VALUE",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"hash" : null
}, {
"name" : "to",
"type" : "VALUE",
"value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"requests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"recipient_address" : {
"type" : "string"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"send_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"token_address" : {
"type" : [ "string", "null" ]
}
}
}
}
}
}
5.5. Fetch Asset Send Requests by Recipient Address
Fetches stored asset send requests with their current status filtered by recipient address which was specified at the moment of request creation.
Request Example
GET /v1/send/by-recipient/0x4e90a36b45879f5bae71b57ad525e817afa54890 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: a490074b-d835-46b5-b43e-f248c7a837dc
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3726
{
"requests" : [ {
"id" : "8df951c4-36a6-49d9-b7b6-fbbc4f12e31a",
"project_id" : "d81ae911-75ae-4922-bb4a-7ca3eb2a53c4",
"status" : "SUCCESS",
"chain_id" : 31337,
"token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"asset_type" : "TOKEN",
"amount" : "10",
"sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"recipient_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"redirect_url" : "https://example.com/request-send/8df951c4-36a6-49d9-b7b6-fbbc4f12e31a/action",
"send_tx" : {
"tx_hash" : "0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0xa9059cbb0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:50Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3\",\"transactionIndex\":0,\"blockHash\":\"0x26e22f166058fc3f919ce34edc7fbf083105d39dcb3536f87b59c16a3ccc0056\",\"blockNumber\":2,\"cumulativeGasUsed\":51525,\"gasUsed\":51525,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3\",\"blockHash\":\"0x26e22f166058fc3f919ce34edc7fbf083105d39dcb3536f87b59c16a3ccc0056\",\"blockNumber\":2,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"0x0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000008002000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000010000000000000000000000000000008000000000000200000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000800000002000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000200000000000000000000000000\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0xc945\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"cumulativeGasUsedRaw\":\"0xc945\"}"
},
"created_at" : "2024-02-23T12:16:19.79254Z",
"events" : [ {
"signature" : "Transfer(address,address,uint256)",
"arguments" : [ {
"name" : "from",
"type" : "VALUE",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"hash" : null
}, {
"name" : "to",
"type" : "VALUE",
"value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"requests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"recipient_address" : {
"type" : "string"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"send_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"token_address" : {
"type" : [ "string", "null" ]
}
}
}
}
}
}
5.6. Attach Transaction Info to Asset Send Request
Attaches transaction hash and caller wallet address to existing asset send request. Once the transaction hash is attached to the request, any subsequent attempts to attach a new transaction hash will fail.
Request Example
PUT /v1/send/84288682-25ae-4d3a-bb76-6c7729b7cc4f HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080
{
"tx_hash" : "0x1",
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"caller_address" : {
"type" : "string"
},
"tx_hash" : {
"type" : "string"
}
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 5f858bb8-21a0-4414-a6ca-b8b549383bfa
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
6. Asset Multi-Send Request API
All endpoints are public and do not require Authorization: Bearer JWT
header.
6.1. Create Asset Multi-Send Request
Creates asset multi-send request with specified parameters. Parameters redirect_url
, sender_address
,
arbitrary_data
, approve_screen_config
and all its child fields, and disperse_screen_config
and all its child
fields are optional. arbitrary_data
field can contain any desired JSON value. Multi-send request ID can be
interpolated into the redirect_url
by placing ${id}
placeholder in the place where request ID is desired in the URL.
The placeholder must strictly have dollar sign and brackets to be interpolated, and only id
field can be interpolated.
If asset_type
is set to NATIVE
, then chain-native currency will be send (i.e. Ether) and then token_address
must
not be present. If asset_type
is set to TOKEN
, then token_address
must be present.
For requests that send tokens, approve_status
and approve_tx
will be returned during the request creation and
disperse_status
and disperse_tx
will be null
. After the approve transaction info is attached and is successful,
the disperse_status
and disperse_tx
fields will no longer be null
.
For requests that send native asset, approve_status
and approve_tx
will always be null
and disperse_status
and
disperse_tx
will always be non-null
.
This request requires an API key present in the X-API-KEY
header.
Request Example
POST /v1/multi-send HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 792
Host: localhost:8080
{
"redirect_url" : "https://custom-url/${id}",
"token_address" : "0x00000000000000000000000000000000cafebabe",
"disperse_contract_address" : "0x0000000000000000000000000000000000000abe",
"asset_type" : "TOKEN",
"items" : [ {
"wallet_address" : "0x000000000000000000000000000000000000000c",
"amount" : "10",
"item_name" : "Example"
} ],
"sender_address" : "0x000000000000000000000000000000000000000b",
"arbitrary_data" : {
"test" : true
},
"approve_screen_config" : {
"before_action_message" : "approve-before-action-message",
"after_action_message" : "approve-after-action-message"
},
"disperse_screen_config" : {
"before_action_message" : "disperse-before-action-message",
"after_action_message" : "disperse-after-action-message"
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 91796d92-efe0-452e-9015-89fa8b58163e
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1573
{
"id" : "1345b59f-cd51-4e87-901a-8331feb4f649",
"project_id" : "762f7fb8-e03d-4918-bd91-97dd595a92cf",
"approve_status" : "PENDING",
"disperse_status" : null,
"chain_id" : 31337,
"token_address" : "0x00000000000000000000000000000000cafebabe",
"disperse_contract_address" : "0x0000000000000000000000000000000000000abe",
"asset_type" : "TOKEN",
"items" : [ {
"wallet_address" : "0x000000000000000000000000000000000000000c",
"amount" : "10",
"item_name" : "Example"
} ],
"sender_address" : "0x000000000000000000000000000000000000000b",
"arbitrary_data" : {
"test" : true
},
"approve_screen_config" : {
"before_action_message" : "approve-before-action-message",
"after_action_message" : "approve-after-action-message"
},
"disperse_screen_config" : {
"before_action_message" : "disperse-before-action-message",
"after_action_message" : "disperse-after-action-message"
},
"redirect_url" : "https://custom-url/1345b59f-cd51-4e87-901a-8331feb4f649",
"approve_tx" : {
"tx_hash" : null,
"from" : "0x000000000000000000000000000000000000000b",
"to" : "0x00000000000000000000000000000000cafebabe",
"data" : "0x095ea7b30000000000000000000000000000000000000000000000000000000000000abe000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : null,
"timestamp" : null,
"raw_rpc_transaction_receipt" : null
},
"disperse_tx" : null,
"created_at" : "2024-02-23T12:16:12.979879Z",
"approve_events" : null,
"disperse_events" : null
}
Schemas:
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"ScreenConfig-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
}
},
"type" : "object",
"properties" : {
"approve_screen_config" : {
"$ref" : "#/$defs/ScreenConfig-nullable"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"disperse_contract_address" : {
"type" : "string"
},
"disperse_screen_config" : {
"$ref" : "#/$defs/ScreenConfig-nullable"
},
"items" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"item_name" : {
"type" : [ "string", "null" ]
},
"wallet_address" : {
"type" : "string"
}
}
}
},
"redirect_url" : {
"type" : [ "string", "null" ]
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"token_address" : {
"type" : [ "string", "null" ]
}
}
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"EventInfoResponse" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
},
"ScreenConfig-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"Status-nullable" : {
"anyOf" : [ {
"type" : "null"
}, {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
} ]
},
"TransactionResponse-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
}
},
"type" : "object",
"properties" : {
"approve_events" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/EventInfoResponse"
}
},
"approve_screen_config" : {
"$ref" : "#/$defs/ScreenConfig-nullable"
},
"approve_status" : {
"$ref" : "#/$defs/Status-nullable"
},
"approve_tx" : {
"$ref" : "#/$defs/TransactionResponse-nullable"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"disperse_contract_address" : {
"type" : "string"
},
"disperse_events" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/EventInfoResponse"
}
},
"disperse_screen_config" : {
"$ref" : "#/$defs/ScreenConfig-nullable"
},
"disperse_status" : {
"$ref" : "#/$defs/Status-nullable"
},
"disperse_tx" : {
"$ref" : "#/$defs/TransactionResponse-nullable"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"items" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"item_name" : {
"type" : [ "string", "null" ]
},
"wallet_address" : {
"type" : "string"
}
}
}
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"token_address" : {
"type" : [ "string", "null" ]
}
}
}
6.2. Fetch Asset Multi-Send Request by ID
Fetches stored asset multi-send request with its current status.
For token transfers, the request is considered successful if the attached approve and disperse transactions are
confirmed on blockchain and all their data matches specified request parameters (correct to
and from
addresses,
amount
, matching data
and tx_hash
). If there are any mismatches between specified request data and state on
blockchain, the request will be marked as failed. If there are no attached transaction hashes or if approve or disperse
transactions for attached hashes are not yet mined on blockchain, request will be in pending state.
If approve_status
is FAILED
or PENDING
for token transfer request, then disperse_status
and disperse_tx
will
be null
until approve_status
changes to SUCCESS
.
For native token transfers, only disperse transaction is considered when determining request status (both
approve_status
and approve_tx
fields will be null
).
Request Example
GET /v1/multi-send/0c201b99-05aa-47bf-9046-d6542e17cd7b HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 67458370-5a8b-4360-a084-d3fb6e4639d2
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 8369
{
"id" : "0c201b99-05aa-47bf-9046-d6542e17cd7b",
"project_id" : "762f7fb8-e03d-4918-bd91-97dd595a92cf",
"approve_status" : "SUCCESS",
"disperse_status" : "SUCCESS",
"chain_id" : 31337,
"token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"disperse_contract_address" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"asset_type" : "TOKEN",
"items" : [ {
"wallet_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"amount" : "10",
"item_name" : "Example"
} ],
"sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"arbitrary_data" : {
"test" : true
},
"approve_screen_config" : {
"before_action_message" : "approve-before-action-message",
"after_action_message" : "approve-after-action-message"
},
"disperse_screen_config" : {
"before_action_message" : "disperse-before-action-message",
"after_action_message" : "disperse-after-action-message"
},
"redirect_url" : "https://example.com/request-multi-send/0c201b99-05aa-47bf-9046-d6542e17cd7b/action",
"approve_tx" : {
"tx_hash" : "0x0754ac2ef0f2f88032df6e89fe5dbffc7a13afd66a195c04bc1d4e94d921a443",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0x095ea7b300000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "3",
"timestamp" : "2024-02-23T12:15:51Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x0754ac2ef0f2f88032df6e89fe5dbffc7a13afd66a195c04bc1d4e94d921a443\",\"transactionIndex\":0,\"blockHash\":\"0x02e3cad988a56fa4516ae56ece57bf66d1c11cdaee9c51d487a0261bbc2892ee\",\"blockNumber\":3,\"cumulativeGasUsed\":45942,\"gasUsed\":45942,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x0754ac2ef0f2f88032df6e89fe5dbffc7a13afd66a195c04bc1d4e94d921a443\",\"blockHash\":\"0x02e3cad988a56fa4516ae56ece57bf66d1c11cdaee9c51d487a0261bbc2892ee\",\"blockNumber\":3,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\",\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"0x00000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x3\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000400000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200200000000000000000000000010002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000200000000000000000000000000000020000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000200000000000000000000000000\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0xb376\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x3\",\"cumulativeGasUsedRaw\":\"0xb376\"}"
},
"disperse_tx" : {
"tx_hash" : "0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"data" : "0xc73a2d60000000000000000000000000668ed30aacc7c7c206aaf1327d733226416233e2000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000004e90a36b45879f5bae71b57ad525e817afa548900000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:53Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e\",\"transactionIndex\":0,\"blockHash\":\"0x3bcb2636a318c0a3f982a759d3d1b40f7b82c23360e2ae1152af7fc94375e045\",\"blockNumber\":5,\"cumulativeGasUsed\":54018,\"gasUsed\":54018,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e\",\"blockHash\":\"0x3bcb2636a318c0a3f982a759d3d1b40f7b82c23360e2ae1152af7fc94375e045\",\"blockNumber\":5,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"0x00000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x5\",\"logIndexRaw\":\"0x0\"},{\"removed\":false,\"logIndex\":1,\"transactionIndex\":0,\"transactionHash\":\"0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e\",\"blockHash\":\"0x3bcb2636a318c0a3f982a759d3d1b40f7b82c23360e2ae1152af7fc94375e045\",\"blockNumber\":5,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x00000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74\",\"0x0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x5\",\"logIndexRaw\":\"0x1\"}],\"logsBloom\":\"0x00000000400000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000018002000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000010000000000000000000000000000008000000000000200000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000800000002000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000200000000000000000000000000\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0xd302\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x5\",\"cumulativeGasUsedRaw\":\"0xd302\"}"
},
"created_at" : "2024-02-23T12:16:12.582604Z",
"approve_events" : [ {
"signature" : "Approval(address,address,uint256)",
"arguments" : [ {
"name" : "owner",
"type" : "VALUE",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"hash" : null
}, {
"name" : "spender",
"type" : "VALUE",
"value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
} ],
"disperse_events" : [ {
"signature" : "Transfer(address,address,uint256)",
"arguments" : [ {
"name" : "from",
"type" : "VALUE",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"hash" : null
}, {
"name" : "to",
"type" : "VALUE",
"value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
}, {
"signature" : "Transfer(address,address,uint256)",
"arguments" : [ {
"name" : "from",
"type" : "VALUE",
"value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"hash" : null
}, {
"name" : "to",
"type" : "VALUE",
"value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"EventInfoResponse" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
},
"ScreenConfig-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"Status-nullable" : {
"anyOf" : [ {
"type" : "null"
}, {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
} ]
},
"TransactionResponse-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
}
},
"type" : "object",
"properties" : {
"approve_events" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/EventInfoResponse"
}
},
"approve_screen_config" : {
"$ref" : "#/$defs/ScreenConfig-nullable"
},
"approve_status" : {
"$ref" : "#/$defs/Status-nullable"
},
"approve_tx" : {
"$ref" : "#/$defs/TransactionResponse-nullable"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"disperse_contract_address" : {
"type" : "string"
},
"disperse_events" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/EventInfoResponse"
}
},
"disperse_screen_config" : {
"$ref" : "#/$defs/ScreenConfig-nullable"
},
"disperse_status" : {
"$ref" : "#/$defs/Status-nullable"
},
"disperse_tx" : {
"$ref" : "#/$defs/TransactionResponse-nullable"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"items" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"item_name" : {
"type" : [ "string", "null" ]
},
"wallet_address" : {
"type" : "string"
}
}
}
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"token_address" : {
"type" : [ "string", "null" ]
}
}
}
6.3. Fetch Asset Multi-Send Requests by Project ID
Fetches stored asset multi-send requests with their current status filtered by project ID.
Request Example
GET /v1/multi-send/by-project/762f7fb8-e03d-4918-bd91-97dd595a92cf HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 5f93a532-6955-459b-8162-7c45650aee45
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 8600
{
"requests" : [ {
"id" : "d3c7203d-a19b-4340-bf3e-130ae95946de",
"project_id" : "762f7fb8-e03d-4918-bd91-97dd595a92cf",
"approve_status" : "SUCCESS",
"disperse_status" : "SUCCESS",
"chain_id" : 31337,
"token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"disperse_contract_address" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"asset_type" : "TOKEN",
"items" : [ {
"wallet_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"amount" : "10",
"item_name" : "Example"
} ],
"sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"arbitrary_data" : {
"test" : true
},
"approve_screen_config" : {
"before_action_message" : "approve-before-action-message",
"after_action_message" : "approve-after-action-message"
},
"disperse_screen_config" : {
"before_action_message" : "disperse-before-action-message",
"after_action_message" : "disperse-after-action-message"
},
"redirect_url" : "https://example.com/request-multi-send/d3c7203d-a19b-4340-bf3e-130ae95946de/action",
"approve_tx" : {
"tx_hash" : "0x0754ac2ef0f2f88032df6e89fe5dbffc7a13afd66a195c04bc1d4e94d921a443",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0x095ea7b300000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "3",
"timestamp" : "2024-02-23T12:15:51Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x0754ac2ef0f2f88032df6e89fe5dbffc7a13afd66a195c04bc1d4e94d921a443\",\"transactionIndex\":0,\"blockHash\":\"0x7b2f62e6adc663a205e534506a1be264c69d04a104b07da65f5387d49fce28a2\",\"blockNumber\":3,\"cumulativeGasUsed\":45942,\"gasUsed\":45942,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x0754ac2ef0f2f88032df6e89fe5dbffc7a13afd66a195c04bc1d4e94d921a443\",\"blockHash\":\"0x7b2f62e6adc663a205e534506a1be264c69d04a104b07da65f5387d49fce28a2\",\"blockNumber\":3,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\",\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"0x00000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x3\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000400000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200200000000000000000000000010002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000200000000000000000000000000000020000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000200000000000000000000000000\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0xb376\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x3\",\"cumulativeGasUsedRaw\":\"0xb376\"}"
},
"disperse_tx" : {
"tx_hash" : "0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"data" : "0xc73a2d60000000000000000000000000668ed30aacc7c7c206aaf1327d733226416233e2000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000004e90a36b45879f5bae71b57ad525e817afa548900000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:53Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e\",\"transactionIndex\":0,\"blockHash\":\"0xc1a36cd3a64138eb05b988d82c9f48b53f12f88a7102792775e4a59c4e1d3d0b\",\"blockNumber\":5,\"cumulativeGasUsed\":54018,\"gasUsed\":54018,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e\",\"blockHash\":\"0xc1a36cd3a64138eb05b988d82c9f48b53f12f88a7102792775e4a59c4e1d3d0b\",\"blockNumber\":5,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"0x00000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x5\",\"logIndexRaw\":\"0x0\"},{\"removed\":false,\"logIndex\":1,\"transactionIndex\":0,\"transactionHash\":\"0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e\",\"blockHash\":\"0xc1a36cd3a64138eb05b988d82c9f48b53f12f88a7102792775e4a59c4e1d3d0b\",\"blockNumber\":5,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x00000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74\",\"0x0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x5\",\"logIndexRaw\":\"0x1\"}],\"logsBloom\":\"0x00000000400000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000018002000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000010000000000000000000000000000008000000000000200000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000800000002000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000200000000000000000000000000\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0xd302\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x5\",\"cumulativeGasUsedRaw\":\"0xd302\"}"
},
"created_at" : "2024-02-23T12:16:15.988212Z",
"approve_events" : [ {
"signature" : "Approval(address,address,uint256)",
"arguments" : [ {
"name" : "owner",
"type" : "VALUE",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"hash" : null
}, {
"name" : "spender",
"type" : "VALUE",
"value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
} ],
"disperse_events" : [ {
"signature" : "Transfer(address,address,uint256)",
"arguments" : [ {
"name" : "from",
"type" : "VALUE",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"hash" : null
}, {
"name" : "to",
"type" : "VALUE",
"value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
}, {
"signature" : "Transfer(address,address,uint256)",
"arguments" : [ {
"name" : "from",
"type" : "VALUE",
"value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"hash" : null
}, {
"name" : "to",
"type" : "VALUE",
"value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"EventInfoResponse" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
},
"ScreenConfig-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"Status-nullable" : {
"anyOf" : [ {
"type" : "null"
}, {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
} ]
},
"TransactionResponse-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
}
},
"type" : "object",
"properties" : {
"requests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"approve_events" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/EventInfoResponse"
}
},
"approve_screen_config" : {
"$ref" : "#/$defs/ScreenConfig-nullable"
},
"approve_status" : {
"$ref" : "#/$defs/Status-nullable"
},
"approve_tx" : {
"$ref" : "#/$defs/TransactionResponse-nullable"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"disperse_contract_address" : {
"type" : "string"
},
"disperse_events" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/EventInfoResponse"
}
},
"disperse_screen_config" : {
"$ref" : "#/$defs/ScreenConfig-nullable"
},
"disperse_status" : {
"$ref" : "#/$defs/Status-nullable"
},
"disperse_tx" : {
"$ref" : "#/$defs/TransactionResponse-nullable"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"items" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"item_name" : {
"type" : [ "string", "null" ]
},
"wallet_address" : {
"type" : "string"
}
}
}
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"token_address" : {
"type" : [ "string", "null" ]
}
}
}
}
}
}
6.4. Fetch Asset Multi-Send Requests by Sender Address
Fetches stored asset multi-send requests with their current status filtered by sender address which was specified at the moment of request creation (if specified) or attached along with transaction info (if not specified during request creation).
Request Example
GET /v1/multi-send/by-sender/0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 6b7dd155-bd7e-482d-b093-2f1b43a83edc
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 8599
{
"requests" : [ {
"id" : "c00af2f0-2f63-4edc-b9c3-62b9b32e548e",
"project_id" : "762f7fb8-e03d-4918-bd91-97dd595a92cf",
"approve_status" : "SUCCESS",
"disperse_status" : "SUCCESS",
"chain_id" : 31337,
"token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"disperse_contract_address" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"asset_type" : "TOKEN",
"items" : [ {
"wallet_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"amount" : "10",
"item_name" : "Example"
} ],
"sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"arbitrary_data" : {
"test" : true
},
"approve_screen_config" : {
"before_action_message" : "approve-before-action-message",
"after_action_message" : "approve-after-action-message"
},
"disperse_screen_config" : {
"before_action_message" : "disperse-before-action-message",
"after_action_message" : "disperse-after-action-message"
},
"redirect_url" : "https://example.com/request-multi-send/c00af2f0-2f63-4edc-b9c3-62b9b32e548e/action",
"approve_tx" : {
"tx_hash" : "0x0754ac2ef0f2f88032df6e89fe5dbffc7a13afd66a195c04bc1d4e94d921a443",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0x095ea7b300000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "3",
"timestamp" : "2024-02-23T12:15:51Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x0754ac2ef0f2f88032df6e89fe5dbffc7a13afd66a195c04bc1d4e94d921a443\",\"transactionIndex\":0,\"blockHash\":\"0x14093912352b1bb4a56cd72c4fb750207c1e21804f827c9ec4093de9ee6bc58d\",\"blockNumber\":3,\"cumulativeGasUsed\":45942,\"gasUsed\":45942,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x0754ac2ef0f2f88032df6e89fe5dbffc7a13afd66a195c04bc1d4e94d921a443\",\"blockHash\":\"0x14093912352b1bb4a56cd72c4fb750207c1e21804f827c9ec4093de9ee6bc58d\",\"blockNumber\":3,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\",\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"0x00000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x3\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000400000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200200000000000000000000000010002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000200000000000000000000000000000020000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000200000000000000000000000000\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0xb376\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x3\",\"cumulativeGasUsedRaw\":\"0xb376\"}"
},
"disperse_tx" : {
"tx_hash" : "0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"data" : "0xc73a2d60000000000000000000000000668ed30aacc7c7c206aaf1327d733226416233e2000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000004e90a36b45879f5bae71b57ad525e817afa548900000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:53Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e\",\"transactionIndex\":0,\"blockHash\":\"0x03e8b5dc180297a1c8c67bbe9b5401f8cdcfb97b6c985c08bbf85c232e214e09\",\"blockNumber\":5,\"cumulativeGasUsed\":54018,\"gasUsed\":54018,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e\",\"blockHash\":\"0x03e8b5dc180297a1c8c67bbe9b5401f8cdcfb97b6c985c08bbf85c232e214e09\",\"blockNumber\":5,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"0x00000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x5\",\"logIndexRaw\":\"0x0\"},{\"removed\":false,\"logIndex\":1,\"transactionIndex\":0,\"transactionHash\":\"0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e\",\"blockHash\":\"0x03e8b5dc180297a1c8c67bbe9b5401f8cdcfb97b6c985c08bbf85c232e214e09\",\"blockNumber\":5,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x00000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74\",\"0x0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x5\",\"logIndexRaw\":\"0x1\"}],\"logsBloom\":\"0x00000000400000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000018002000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000010000000000000000000000000000008000000000000200000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000800000002000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000200000000000000000000000000\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0xd302\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x5\",\"cumulativeGasUsedRaw\":\"0xd302\"}"
},
"created_at" : "2024-02-23T12:16:15.66019Z",
"approve_events" : [ {
"signature" : "Approval(address,address,uint256)",
"arguments" : [ {
"name" : "owner",
"type" : "VALUE",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"hash" : null
}, {
"name" : "spender",
"type" : "VALUE",
"value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
} ],
"disperse_events" : [ {
"signature" : "Transfer(address,address,uint256)",
"arguments" : [ {
"name" : "from",
"type" : "VALUE",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"hash" : null
}, {
"name" : "to",
"type" : "VALUE",
"value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
}, {
"signature" : "Transfer(address,address,uint256)",
"arguments" : [ {
"name" : "from",
"type" : "VALUE",
"value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
"hash" : null
}, {
"name" : "to",
"type" : "VALUE",
"value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
"hash" : null
}, {
"name" : "value",
"type" : "VALUE",
"value" : "10",
"hash" : null
} ]
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"EventInfoResponse" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
},
"ScreenConfig-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"Status-nullable" : {
"anyOf" : [ {
"type" : "null"
}, {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
} ]
},
"TransactionResponse-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
}
},
"type" : "object",
"properties" : {
"requests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"approve_events" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/EventInfoResponse"
}
},
"approve_screen_config" : {
"$ref" : "#/$defs/ScreenConfig-nullable"
},
"approve_status" : {
"$ref" : "#/$defs/Status-nullable"
},
"approve_tx" : {
"$ref" : "#/$defs/TransactionResponse-nullable"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"disperse_contract_address" : {
"type" : "string"
},
"disperse_events" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/EventInfoResponse"
}
},
"disperse_screen_config" : {
"$ref" : "#/$defs/ScreenConfig-nullable"
},
"disperse_status" : {
"$ref" : "#/$defs/Status-nullable"
},
"disperse_tx" : {
"$ref" : "#/$defs/TransactionResponse-nullable"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"items" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"item_name" : {
"type" : [ "string", "null" ]
},
"wallet_address" : {
"type" : "string"
}
}
}
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"token_address" : {
"type" : [ "string", "null" ]
}
}
}
}
}
}
6.5. Attach Approve Transaction Info to Asset Multi-Send Request
Attaches approve transaction hash and caller wallet address to existing asset multi-send request. Once the approve transaction hash is attached to the request, any subsequent attempts to attach a new approve transaction hash will fail. Only token transfers require an approve transaction, for native asset this step is skipped.
Request Example
PUT /v1/multi-send/c342a9de-5dad-46cd-b802-8715f6ec71ff/approve HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080
{
"tx_hash" : "0x1",
"caller_address" : "0x000000000000000000000000000000000000000d"
}
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"caller_address" : {
"type" : "string"
},
"tx_hash" : {
"type" : "string"
}
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: fb9d5ed1-aa83-46f0-afac-5743a9856af6
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
6.6. Attach Disperse Transaction Info to Asset Multi-Send Request
Attaches disperse transaction hash and caller wallet address to existing asset multi-send request. Once the disperse transaction hash is attached to the request, any subsequent attempts to attach a new approve transaction hash will fail. For token transfers, disperse transaction info must be attached after the approve transaction has been successful and its info has been attached to the request. For native asset transfers, only disperse transaction info must be attached.
Request Example
PUT /v1/multi-send/8223eb31-df9c-498d-8860-3e12109a668f/disperse HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080
{
"tx_hash" : "0x1",
"caller_address" : "0x000000000000000000000000000000000000000d"
}
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"caller_address" : {
"type" : "string"
},
"tx_hash" : {
"type" : "string"
}
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 8ea871d1-93ca-41b9-a4fd-009131949eb3
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
7. ERC20 Lock Request API
All endpoints are public and do not require Authorization: Bearer JWT
header.
7.1. Create ERC20 Lock Request
Creates ERC20 lock request with specified parameters. Parameters redirect_url
, sender_address
, arbitrary_data
,
screen_config
and all its child fields are optional. arbitrary_data
field can contain any desired JSON value. Lock
request ID can be interpolated into the redirect_url
by placing ${id}
placeholder in the place where request ID is
desired in the URL. The placeholder must strictly have dollar sign and brackets to be interpolated, and only id
field can be interpolated.
This request requires an API key present in the X-API-KEY
header.
Request Example
POST /v1/lock HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 493
Host: localhost:8080
{
"redirect_url" : "https://custom-url/${id}",
"token_address" : "0x00000000000000000000000000000000cafebabe",
"amount" : "10",
"lock_duration_in_seconds" : "100",
"lock_contract_address" : "0x000000000000000000000000000000000000000b",
"sender_address" : "0x000000000000000000000000000000000000000c",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 264158f3-b83d-4af1-bd20-a2793a511f05
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1582
{
"id" : "92ebdb2b-157d-4214-b447-fecd157075e3",
"project_id" : "8a4339cd-8a54-4c97-8133-6b1f06f9ac52",
"status" : "PENDING",
"chain_id" : 31337,
"token_address" : "0x00000000000000000000000000000000cafebabe",
"amount" : "10",
"lock_duration_in_seconds" : "100",
"unlocks_at" : null,
"lock_contract_address" : "0x000000000000000000000000000000000000000b",
"sender_address" : "0x000000000000000000000000000000000000000c",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"redirect_url" : "https://custom-url/92ebdb2b-157d-4214-b447-fecd157075e3",
"lock_tx" : {
"tx_hash" : null,
"from" : "0x000000000000000000000000000000000000000c",
"to" : "0x00000000000000000000000000000000cafebabe",
"data" : "0xbc633cd400000000000000000000000000000000000000000000000000000000cafebabe000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002439326562646232622d313537642d343231342d623434372d66656364313537303735653300000000000000000000000000000000000000000000000000000000",
"value" : "0",
"block_confirmations" : null,
"timestamp" : null,
"raw_rpc_transaction_receipt" : null
},
"created_at" : "2024-02-23T12:16:56.480608Z",
"events" : null
}
Schemas:
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"lock_contract_address" : {
"type" : "string"
},
"lock_duration_in_seconds" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"redirect_url" : {
"type" : [ "string", "null" ]
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"token_address" : {
"type" : "string"
}
}
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"lock_contract_address" : {
"type" : "string"
},
"lock_duration_in_seconds" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"lock_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"token_address" : {
"type" : "string"
},
"unlocks_at" : {
"type" : [ "string", "null" ],
"format" : "date-time"
}
}
}
7.2. Fetch ERC20 Lock Request by ID
Fetches stored ERC20 lock request with its current status. The request is considered successful if the attached
transaction is confirmed on blockchain and all its data matches specified request parameters (correct to
and from
addresses, amount
, matching data
and tx_hash
). If there are any mismatches between specified request data and
state on blockchain, the request will be marked as failed. If there is no attached transaction hash or if transaction
for attached hash is not yet mined on blockchain, request will be in pending state.
Request Example
GET /v1/lock/3e9f4149-408e-476b-b8b0-cc84b9996e9e HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: f08ee575-407a-4ad2-bf05-9b31a9f14903
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2881
{
"id" : "3e9f4149-408e-476b-b8b0-cc84b9996e9e",
"project_id" : "8a4339cd-8a54-4c97-8133-6b1f06f9ac52",
"status" : "SUCCESS",
"chain_id" : 31337,
"token_address" : "0x000000000000000000000000000000000000000a",
"amount" : "10",
"lock_duration_in_seconds" : "100",
"unlocks_at" : "2024-02-23T12:17:30Z",
"lock_contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"redirect_url" : "https://example.com/request-lock/3e9f4149-408e-476b-b8b0-cc84b9996e9e/action",
"lock_tx" : {
"tx_hash" : "0xf9359897d8df483c5cce2feb648e4a557203087727f00f2785959d1c82597430",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0xbc633cd4000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002433653966343134392d343038652d343736622d623862302d63633834623939393665396500000000000000000000000000000000000000000000000000000000",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:50Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0xf9359897d8df483c5cce2feb648e4a557203087727f00f2785959d1c82597430\",\"transactionIndex\":0,\"blockHash\":\"0x64160db494cbe58e085783736b8d5822391e483c6536d633332ed255e4fdaae3\",\"blockNumber\":2,\"cumulativeGasUsed\":45499,\"gasUsed\":45499,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0xb1bb\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"cumulativeGasUsedRaw\":\"0xb1bb\"}"
},
"created_at" : "2024-02-23T12:16:57.113596Z",
"events" : [ ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"lock_contract_address" : {
"type" : "string"
},
"lock_duration_in_seconds" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"lock_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"token_address" : {
"type" : "string"
},
"unlocks_at" : {
"type" : [ "string", "null" ],
"format" : "date-time"
}
}
}
7.3. Fetch ERC20 Lock Requests by Project ID
Fetches stored ERC20 lock requests with their current status filtered by project ID.
Request Example
GET /v1/lock/by-project/8a4339cd-8a54-4c97-8133-6b1f06f9ac52 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: c4eeb3c3-dba7-45cb-bcde-5aca77e7a552
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2966
{
"requests" : [ {
"id" : "85cd99f1-b6df-4573-a8aa-abf20fec3da8",
"project_id" : "8a4339cd-8a54-4c97-8133-6b1f06f9ac52",
"status" : "SUCCESS",
"chain_id" : 31337,
"token_address" : "0x000000000000000000000000000000000000000a",
"amount" : "10",
"lock_duration_in_seconds" : "100",
"unlocks_at" : "2024-02-23T12:17:30Z",
"lock_contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"redirect_url" : "https://example.com/request-lock/85cd99f1-b6df-4573-a8aa-abf20fec3da8/action",
"lock_tx" : {
"tx_hash" : "0x34360f72e1e1b98dacf0bc71d56af2c853fc73b430ae30a08b7538f5c8d5fc7c",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0xbc633cd4000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002438356364393966312d623664662d343537332d613861612d61626632306665633364613800000000000000000000000000000000000000000000000000000000",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:50Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x34360f72e1e1b98dacf0bc71d56af2c853fc73b430ae30a08b7538f5c8d5fc7c\",\"transactionIndex\":0,\"blockHash\":\"0x72cf69e5aeef1fdcb83c41c0805986dd8cf8ee3a1f15b03153fde212805a6e9a\",\"blockNumber\":2,\"cumulativeGasUsed\":45499,\"gasUsed\":45499,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0xb1bb\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"cumulativeGasUsedRaw\":\"0xb1bb\"}"
},
"created_at" : "2024-02-23T12:16:56.199009Z",
"events" : [ ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"requests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"lock_contract_address" : {
"type" : "string"
},
"lock_duration_in_seconds" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"lock_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"sender_address" : {
"type" : [ "string", "null" ]
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
},
"token_address" : {
"type" : "string"
},
"unlocks_at" : {
"type" : [ "string", "null" ],
"format" : "date-time"
}
}
}
}
}
}
7.4. Attach Transaction Info to ERC20 Lock Request
Attaches transaction hash and caller wallet address to existing ERC20 lock request. Once the transaction hash is attached to the request, any subsequent attempts to attach a new transaction hash will fail.
Request Example
PUT /v1/lock/75b3c035-4469-4691-86c7-4bcbb1a83d41 HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080
{
"tx_hash" : "0x1",
"caller_address" : "0x000000000000000000000000000000000000000c"
}
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"caller_address" : {
"type" : "string"
},
"tx_hash" : {
"type" : "string"
}
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: f055ec4a-18fd-4a3f-ac5f-50a96317bd2d
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
8. Deployable Contracts API
All endpoints are public and do not require Authorization: Bearer JWT
header.
8.1. Fetch Deployable Contract by ID
Fetches info about deployable contract by contract ID.
Query Parameters
Parameter | Description |
---|---|
|
Project ID under which to search for imported contract decorator ID. Imported contract decorators can potentially have same IDs, so this query parameter is used to distinguish between them. |
Request Example
GET /v1/deployable-contracts/examples.examplecontract HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 7ba9a4eb-3284-40d5-b531-72473297667b
Content-Disposition: inline;filename=f.txt
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2228
{
"id" : "examples.examplecontract",
"name" : "name",
"description" : "description",
"binary" : "6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033",
"tags" : [ "example", "simple" ],
"implements" : [ "traits.example", "traits.exampleownable" ],
"constructors" : [ {
"inputs" : [ {
"name" : "Owner address",
"description" : "Contract owner address",
"solidity_name" : "owner",
"solidity_type" : "address",
"recommended_types" : [ ],
"parameters" : null,
"hints" : null
} ],
"description" : "Main constructor",
"payable" : true
} ],
"functions" : [ {
"name" : "Get contract owner",
"description" : "Fetches contract owner",
"solidity_name" : "getOwner",
"signature" : "getOwner()",
"inputs" : [ ],
"outputs" : [ {
"name" : "Owner address",
"description" : "Contract owner address",
"solidity_name" : "",
"solidity_type" : "address",
"recommended_types" : [ ],
"parameters" : null,
"hints" : null
} ],
"emittable_events" : [ ],
"read_only" : true
} ],
"events" : [ ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"ContractParameter" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"recommended_types" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"solidity_name" : {
"type" : "string"
},
"solidity_type" : {
"type" : "string"
}
}
}
},
"type" : "object",
"properties" : {
"binary" : {
"type" : "string"
},
"constructors" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"inputs" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"payable" : {
"type" : "boolean"
}
}
}
},
"description" : {
"type" : [ "string", "null" ]
},
"events" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"inputs" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"indexed" : {
"type" : "boolean"
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"recommended_types" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"solidity_name" : {
"type" : "string"
},
"solidity_type" : {
"type" : "string"
}
}
}
},
"name" : {
"type" : "string"
},
"signature" : {
"type" : "string"
},
"solidity_name" : {
"type" : "string"
}
}
}
},
"functions" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"emittable_events" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"inputs" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"name" : {
"type" : "string"
},
"outputs" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"read_only" : {
"type" : "boolean"
},
"signature" : {
"type" : "string"
},
"solidity_name" : {
"type" : "string"
}
}
}
},
"id" : {
"type" : "string"
},
"implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : [ "string", "null" ]
},
"tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
8.2. Fetch Deployable Contract manifest.json
by ID
Fetches manifest.json
file for deployable contract by contract ID.
Query Parameters
Parameter | Description |
---|---|
|
Project ID under which to search for imported contract decorator ID. Imported contract decorators can potentially have same IDs, so this query parameter is used to distinguish between them. |
Request Example
GET /v1/deployable-contracts/examples.examplecontract/manifest.json HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 92294aa6-6420-436c-9fd9-be9cdb4e22ff
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 968
{
"name" : "name",
"description" : "description",
"tags" : [ "example", "simple" ],
"implements" : [ "traits.example", "traits.exampleOwnable" ],
"eventDecorators" : [ ],
"constructorDecorators" : [ {
"signature" : "constructor(address)",
"description" : "Main constructor",
"parameterDecorators" : [ {
"name" : "Owner address",
"description" : "Contract owner address",
"recommendedTypes" : [ ],
"parameters" : null,
"hints" : null
} ]
} ],
"functionDecorators" : [ {
"signature" : "getOwner()",
"name" : "Get contract owner",
"description" : "Fetches contract owner",
"parameterDecorators" : [ ],
"returnDecorators" : [ {
"name" : "Owner address",
"description" : "Contract owner address",
"solidityType" : "address",
"recommendedTypes" : [ ],
"parameters" : null,
"hints" : null
} ],
"emittableEvents" : [ ],
"readOnly" : false
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"ReturnTypeDecorator" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/ReturnTypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"solidityType" : {
"type" : "string"
}
}
},
"TypeDecorator" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"type" : "object",
"properties" : {
"constructorDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"signature" : {
"type" : "string"
}
}
}
},
"description" : {
"type" : [ "string", "null" ]
},
"eventDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"indexed" : {
"type" : "boolean"
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"signature" : {
"type" : "string"
}
}
}
},
"functionDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"emittableEvents" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"readOnly" : {
"type" : "boolean"
},
"returnDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ReturnTypeDecorator"
}
},
"signature" : {
"type" : "string"
}
}
}
},
"implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : [ "string", "null" ]
},
"tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
8.3. Fetch Deployable Contract artifact.json
by ID
Fetches artifact.json
file for deployable contract by contract ID.
Query Parameters
Parameter | Description |
---|---|
|
Project ID under which to search for imported contract decorator ID. Imported contract decorators can potentially have same IDs, so this query parameter is used to distinguish between them. |
Request Example
GET /v1/deployable-contracts/examples.examplecontract/artifact.json HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 380f7838-14f9-495a-a7d4-26fb5b13dc18
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 209
{
"contractName" : "ExampleContract",
"sourceName" : "ExampleContract.sol",
"abi" : [ ],
"bytecode" : "0x0",
"deployedBytecode" : "0x0",
"linkReferences" : null,
"deployedLinkReferences" : null
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"AbiInputOutput" : {
"type" : "object",
"properties" : {
"components" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/AbiInputOutput"
}
},
"indexed" : {
"type" : [ "boolean", "null" ]
},
"internalType" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string"
}
}
},
"JsonNode-nullable" : {
"type" : [ "object", "null" ]
}
},
"type" : "object",
"properties" : {
"abi" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"anonymous" : {
"type" : [ "boolean", "null" ]
},
"inputs" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/AbiInputOutput"
}
},
"name" : {
"type" : [ "string", "null" ]
},
"outputs" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/AbiInputOutput"
}
},
"stateMutability" : {
"type" : [ "string", "null" ]
},
"type" : {
"type" : "string"
}
}
}
},
"bytecode" : {
"type" : "string"
},
"contractName" : {
"type" : "string"
},
"deployedBytecode" : {
"type" : "string"
},
"deployedLinkReferences" : {
"$ref" : "#/$defs/JsonNode-nullable"
},
"linkReferences" : {
"$ref" : "#/$defs/JsonNode-nullable"
},
"sourceName" : {
"type" : "string"
}
}
}
8.4. Fetch Deployable Contract info.md
by ID
Fetches info.md
file for deployable contract by contract ID.
Query Parameters
Parameter | Description |
---|---|
|
Project ID under which to search for imported contract decorator ID. Imported contract decorators can potentially have same IDs, so this query parameter is used to distinguish between them. |
Request Example
GET /v1/deployable-contracts/examples.examplecontract/info.md HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: dd2eea17-9ddf-4059-839c-c9063115dcf3
Content-Type: text/markdown;charset=UTF-8
Content-Length: 23
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
# info.md file contents
8.5. Fetch List of Deployable Contracts
Fetches list of deployable contracts with specified filters.
Query Parameters
Parameter | Description |
---|---|
|
Comma separated list of contract tags to filter by. Individual elements can contain multiple contract tags separated by
Example: |
|
Comma separated list of implemented contract traits to filter by. Individual elements can contain multiple implemented
contract traits separated by |
|
ID of the project for which imported contract decorators will be fetched. |
Request Example
GET /v1/deployable-contracts/?tags=example%20AND%20simple,other&implements=traits/example%20AND%20traits/exampleOwnable,traits/other HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 2ce107a7-fb07-478a-95f9-abceff6e579d
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2341
{
"deployable_contracts" : [ {
"id" : "examples.examplecontract",
"name" : "name",
"description" : "description",
"binary" : "6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033",
"tags" : [ "example", "simple" ],
"implements" : [ "traits.example", "traits.exampleownable" ],
"constructors" : [ {
"inputs" : [ {
"name" : "Owner address",
"description" : "Contract owner address",
"solidity_name" : "owner",
"solidity_type" : "address",
"recommended_types" : [ ],
"parameters" : null,
"hints" : null
} ],
"description" : "Main constructor",
"payable" : true
} ],
"functions" : [ {
"name" : "Get contract owner",
"description" : "Fetches contract owner",
"solidity_name" : "getOwner",
"signature" : "getOwner()",
"inputs" : [ ],
"outputs" : [ {
"name" : "Owner address",
"description" : "Contract owner address",
"solidity_name" : "",
"solidity_type" : "address",
"recommended_types" : [ ],
"parameters" : null,
"hints" : null
} ],
"emittable_events" : [ ],
"read_only" : true
} ],
"events" : [ ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"ContractParameter" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"recommended_types" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"solidity_name" : {
"type" : "string"
},
"solidity_type" : {
"type" : "string"
}
}
}
},
"type" : "object",
"properties" : {
"deployable_contracts" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"binary" : {
"type" : "string"
},
"constructors" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"inputs" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"payable" : {
"type" : "boolean"
}
}
}
},
"description" : {
"type" : [ "string", "null" ]
},
"events" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"inputs" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"indexed" : {
"type" : "boolean"
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"recommended_types" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"solidity_name" : {
"type" : "string"
},
"solidity_type" : {
"type" : "string"
}
}
}
},
"name" : {
"type" : "string"
},
"signature" : {
"type" : "string"
},
"solidity_name" : {
"type" : "string"
}
}
}
},
"functions" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"emittable_events" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"inputs" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"name" : {
"type" : "string"
},
"outputs" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"read_only" : {
"type" : "boolean"
},
"signature" : {
"type" : "string"
},
"solidity_name" : {
"type" : "string"
}
}
}
},
"id" : {
"type" : "string"
},
"implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : [ "string", "null" ]
},
"tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
}
}
}
8.6. Fetch List of Deployable Contract manifest.json
Files
Fetches list of deployable contract manifest.json
files with specified filters.
Query Parameters
Parameter | Description |
---|---|
|
Comma separated list of contract tags to filter by. Individual elements can contain multiple contract tags separated by
Example: |
|
Comma separated list of implemented contract traits to filter by. Individual elements can contain multiple implemented
contract traits separated by |
|
ID of the project for which imported contract decorator |
Request Example
GET /v1/deployable-contracts/manifest.json?tags=example%20AND%20simple,other&implements=traits/example%20AND%20traits/exampleOwnable,traits/other HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 8cf0d98c-6570-4a78-9249-28189f28679c
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1058
{
"manifests" : [ {
"name" : "name",
"description" : "description",
"tags" : [ "example", "simple" ],
"implements" : [ "traits.example", "traits.exampleOwnable" ],
"eventDecorators" : [ ],
"constructorDecorators" : [ {
"signature" : "constructor(address)",
"description" : "Main constructor",
"parameterDecorators" : [ {
"name" : "Owner address",
"description" : "Contract owner address",
"recommendedTypes" : [ ],
"parameters" : null,
"hints" : null
} ]
} ],
"functionDecorators" : [ {
"signature" : "getOwner()",
"name" : "Get contract owner",
"description" : "Fetches contract owner",
"parameterDecorators" : [ ],
"returnDecorators" : [ {
"name" : "Owner address",
"description" : "Contract owner address",
"solidityType" : "address",
"recommendedTypes" : [ ],
"parameters" : null,
"hints" : null
} ],
"emittableEvents" : [ ],
"readOnly" : false
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"ReturnTypeDecorator" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/ReturnTypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"solidityType" : {
"type" : "string"
}
}
},
"TypeDecorator" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"type" : "object",
"properties" : {
"manifests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"constructorDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"signature" : {
"type" : "string"
}
}
}
},
"description" : {
"type" : [ "string", "null" ]
},
"eventDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"indexed" : {
"type" : "boolean"
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"signature" : {
"type" : "string"
}
}
}
},
"functionDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"emittableEvents" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"readOnly" : {
"type" : "boolean"
},
"returnDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ReturnTypeDecorator"
}
},
"signature" : {
"type" : "string"
}
}
}
},
"implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : [ "string", "null" ]
},
"tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
}
}
}
8.7. Fetch List of Deployable Contract artifact.json
Files
Fetches list of deployable contract artifact.json
files with specified filters.
Query Parameters
Parameter | Description |
---|---|
|
Comma separated list of contract tags to filter by. Individual elements can contain multiple contract tags separated by
Example: |
|
Comma separated list of implemented contract traits to filter by. Individual elements can contain multiple implemented
contract traits separated by |
|
ID of the project for which imported contract decorator |
Request Example
GET /v1/deployable-contracts/artifact.json?tags=example%20AND%20simple,other&implements=traits/example%20AND%20traits/exampleOwnable,traits/other HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 0f1ef9f7-e7e8-4d53-86e2-e96b5d73a448
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 249
{
"artifacts" : [ {
"contractName" : "ExampleContract",
"sourceName" : "ExampleContract.sol",
"abi" : [ ],
"bytecode" : "0x0",
"deployedBytecode" : "0x0",
"linkReferences" : null,
"deployedLinkReferences" : null
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"AbiInputOutput" : {
"type" : "object",
"properties" : {
"components" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/AbiInputOutput"
}
},
"indexed" : {
"type" : [ "boolean", "null" ]
},
"internalType" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string"
}
}
},
"JsonNode-nullable" : {
"type" : [ "object", "null" ]
}
},
"type" : "object",
"properties" : {
"artifacts" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"abi" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"anonymous" : {
"type" : [ "boolean", "null" ]
},
"inputs" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/AbiInputOutput"
}
},
"name" : {
"type" : [ "string", "null" ]
},
"outputs" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/AbiInputOutput"
}
},
"stateMutability" : {
"type" : [ "string", "null" ]
},
"type" : {
"type" : "string"
}
}
}
},
"bytecode" : {
"type" : "string"
},
"contractName" : {
"type" : "string"
},
"deployedBytecode" : {
"type" : "string"
},
"deployedLinkReferences" : {
"$ref" : "#/$defs/JsonNode-nullable"
},
"linkReferences" : {
"$ref" : "#/$defs/JsonNode-nullable"
},
"sourceName" : {
"type" : "string"
}
}
}
}
}
}
8.8. Fetch List of Deployable Contract info.md
Files
Fetches list of deployable contract info.md
files with specified filters.
Query Parameters
Parameter | Description |
---|---|
|
Comma separated list of contract tags to filter by. Individual elements can contain multiple contract tags separated by
Example: |
|
Comma separated list of implemented contract traits to filter by. Individual elements can contain multiple implemented
contract traits separated by |
|
ID of the project for which imported contract decorator |
Request Example
GET /v1/deployable-contracts/info.md?tags=example%20AND%20simple,other&implements=traits/example%20AND%20traits/exampleOwnable,traits/other HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 81d9cbdb-bfab-45c3-8c67-fbc55002b016
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 45
{
"infos" : [ "# info.md file contents" ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"infos" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
9. Contract Interfaces API
All endpoints are public and do not require Authorization: Bearer JWT
header.
9.1. Fetch Contract Interface by ID
Fetches info about contract interface by interface ID.
Request Example
GET /v1/contract-interfaces/example.interface HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: b4542c5f-57b6-492f-ab34-531e68eb8f7b
Content-Disposition: inline;filename=f.txt
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 636
{
"id" : "example.interface",
"name" : "name",
"tags" : [ "interface-tag", "another-interface-tag" ],
"description" : "description",
"event_decorators" : [ ],
"function_decorators" : [ {
"signature" : "getOwner()",
"name" : "Get contract owner",
"description" : "Fetches contract owner",
"parameterDecorators" : [ ],
"returnDecorators" : [ {
"name" : "Owner address",
"description" : "Contract owner address",
"solidityType" : "address",
"recommendedTypes" : [ ],
"parameters" : null,
"hints" : null
} ],
"emittableEvents" : [ ],
"readOnly" : false
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"ReturnTypeDecorator" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/ReturnTypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"solidityType" : {
"type" : "string"
}
}
},
"TypeDecorator" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"type" : "object",
"properties" : {
"description" : {
"type" : [ "string", "null" ]
},
"event_decorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"indexed" : {
"type" : "boolean"
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"signature" : {
"type" : "string"
}
}
}
},
"function_decorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"emittableEvents" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"readOnly" : {
"type" : "boolean"
},
"returnDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ReturnTypeDecorator"
}
},
"signature" : {
"type" : "string"
}
}
}
},
"id" : {
"type" : "string"
},
"name" : {
"type" : [ "string", "null" ]
},
"tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
9.2. Fetch Contract Interface info.md
by ID
Fetches info.md
file for contract interface by interface ID.
Request Example
GET /v1/contract-interfaces/example.interface/info.md HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 8a529803-05da-4ede-b198-f4ab3bb3f976
Content-Type: text/markdown;charset=UTF-8
Content-Length: 23
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
# info.md file contents
9.3. Fetch List of Contract Interfaces
Fetches list of contract interfaces.
Query Parameters
Parameter | Description |
---|---|
|
Comma separated list of interface tags to filter by. Individual elements can contain multiple interface tags separated
by Example: |
Request Example
GET /v1/contract-interfaces?tags=interface-tag%20AND%20another-interface-tag,other-tag HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: fe0d3221-f00a-4c27-ae10-d8d2b66beb1f
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 704
{
"manifests" : [ {
"id" : "example.interface",
"name" : "name",
"tags" : [ "interface-tag", "another-interface-tag" ],
"description" : "description",
"event_decorators" : [ ],
"function_decorators" : [ {
"signature" : "getOwner()",
"name" : "Get contract owner",
"description" : "Fetches contract owner",
"parameterDecorators" : [ ],
"returnDecorators" : [ {
"name" : "Owner address",
"description" : "Contract owner address",
"solidityType" : "address",
"recommendedTypes" : [ ],
"parameters" : null,
"hints" : null
} ],
"emittableEvents" : [ ],
"readOnly" : false
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"ReturnTypeDecorator" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/ReturnTypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"solidityType" : {
"type" : "string"
}
}
},
"TypeDecorator" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"type" : "object",
"properties" : {
"manifests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : [ "string", "null" ]
},
"event_decorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"indexed" : {
"type" : "boolean"
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"signature" : {
"type" : "string"
}
}
}
},
"function_decorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"emittableEvents" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"readOnly" : {
"type" : "boolean"
},
"returnDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ReturnTypeDecorator"
}
},
"signature" : {
"type" : "string"
}
}
}
},
"id" : {
"type" : "string"
},
"name" : {
"type" : [ "string", "null" ]
},
"tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
}
}
}
9.4. Fetch List of Contract Interface info.md
Files
Fetches list of contract interface info.md
files.
Query Parameters
Parameter | Description |
---|---|
|
Comma separated list of interface tags to filter by. Individual elements can contain multiple interface tags separated
by Example: |
Request Example
GET /v1/contract-interfaces/info.md?tags=interface-tag%20AND%20another-interface-tag,other-tag HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: d26bc98a-405c-48ed-ab8a-8d55adcbe7bf
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 45
{
"infos" : [ "# info.md file contents" ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"infos" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
10. Contract Deployment Request API
All endpoints are public and do not require Authorization: Bearer JWT
header.
10.1. Create Contract Deployment Request
Creates contract deployment request with specified parameters. Parameters redirect_url
, deployer_address
,
arbitrary_data
, screen_config
and all its child fields are optional. arbitrary_data
field can contain any desired
JSON value. Contract deployment request ID can be interpolated into the redirect_url
by placing ${id}
placeholder in
the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be
interpolated, and only id
field can be interpolated.
The constructor_params
field is an array of objects which must have type
and value
according to the table in
section Available Function Argument Types.
This request requires an API key present in the X-API-KEY
header.
Request Example
POST /v1/deploy HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 467
Host: localhost:8080
{
"alias" : "alias",
"contract_id" : "examples.examplecontract",
"constructor_params" : [ {
"type" : "address",
"value" : "0x000000000000000000000000000000000000000a"
} ],
"deployer_address" : "0x000000000000000000000000000000000000000b",
"initial_eth_amount" : "0",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 26d9603b-e4fc-42c7-a300-f95cbb916b79
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3842
{
"id" : "a7a3603c-9674-46eb-ba38-bbc4f1046c15",
"alias" : "alias",
"name" : "name",
"description" : "description",
"status" : "PENDING",
"contract_id" : "examples.examplecontract",
"contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
"constructor_params" : [ {
"type" : "address",
"value" : "0x000000000000000000000000000000000000000a"
} ],
"contract_tags" : [ "example", "simple" ],
"contract_implements" : [ "traits.example", "traits.exampleownable" ],
"initial_eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-deploy/a7a3603c-9674-46eb-ba38-bbc4f1046c15/action",
"project_id" : "9a418cf4-c4ee-4550-9490-9bcaf5c1a99d",
"created_at" : "2024-02-23T12:16:42.189857Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"contract_address" : null,
"deployer_address" : "0x000000000000000000000000000000000000000b",
"deploy_tx" : {
"tx_hash" : null,
"from" : "0x000000000000000000000000000000000000000b",
"to" : "0x0000000000000000000000000000000000000000",
"data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : null,
"timestamp" : null,
"raw_rpc_transaction_receipt" : null
},
"imported" : false,
"proxy" : false,
"implementation_contract_address" : null,
"events" : null
}
Schemas:
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"alias" : {
"type" : "string"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"constructor_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"contract_id" : {
"type" : "string"
},
"deployer_address" : {
"type" : [ "string", "null" ]
},
"initial_eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"redirect_url" : {
"type" : [ "string", "null" ]
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
}
}
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"alias" : {
"type" : "string"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"constructor_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"contract_address" : {
"type" : [ "string", "null" ]
},
"contract_deployment_data" : {
"type" : "string"
},
"contract_id" : {
"type" : "string"
},
"contract_implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"contract_tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deploy_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"deployer_address" : {
"type" : [ "string", "null" ]
},
"description" : {
"type" : [ "string", "null" ]
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"implementation_contract_address" : {
"type" : [ "string", "null" ]
},
"imported" : {
"type" : "boolean"
},
"initial_eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"name" : {
"type" : [ "string", "null" ]
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"proxy" : {
"type" : "boolean"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
10.2. Preview Import of Already Deployed Smart Contract
Previews import of already deployed smart contract for the specified contract address and chain ID.
Query Parameters
Parameter | Description |
---|---|
|
Optional custom RPC URL which will override the default RPC URL for the specified chain. Can be used to provide custom RPC URL for non-supported chains. |
Request Example
GET /v1/import-smart-contract/preview/31337/contract/0x668ed30aacc7c7c206aaf1327d733226416233e2 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 7b483c05-5d0f-447e-be96-0f894232b8c6
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 5941
{
"manifest" : {
"name" : "Imported Contract",
"description" : "Imported smart contract.",
"tags" : [ ],
"implements" : [ "example.ownable" ],
"eventDecorators" : [ ],
"constructorDecorators" : [ ],
"functionDecorators" : [ {
"signature" : "setOwner(address)",
"name" : "setOwner",
"description" : "",
"parameterDecorators" : [ {
"name" : "param1",
"description" : "",
"recommendedTypes" : [ ],
"parameters" : null,
"hints" : null
} ],
"returnDecorators" : [ ],
"emittableEvents" : [ ],
"readOnly" : false
}, {
"signature" : "getOwner()",
"name" : "getOwner",
"description" : "",
"parameterDecorators" : [ ],
"returnDecorators" : [ ],
"emittableEvents" : [ ],
"readOnly" : false
} ]
},
"artifact" : {
"contractName" : "ImportedContract",
"sourceName" : "ImportedContract.sol",
"abi" : [ {
"anonymous" : null,
"inputs" : [ {
"components" : null,
"internalType" : "address",
"name" : "param1",
"type" : "address",
"indexed" : null
} ],
"outputs" : [ ],
"stateMutability" : null,
"name" : "setOwner",
"type" : "function"
}, {
"anonymous" : null,
"inputs" : [ ],
"outputs" : [ ],
"stateMutability" : null,
"name" : "getOwner",
"type" : "function"
} ],
"bytecode" : "6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033",
"deployedBytecode" : "608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033",
"linkReferences" : null,
"deployedLinkReferences" : null
},
"decorator" : {
"id" : "imported-0x668ed30aacc7c7c206aaf1327d733226416233e2-31337",
"name" : "Imported Contract",
"description" : "Imported smart contract.",
"binary" : "6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033",
"tags" : [ "interface-tag" ],
"implements" : [ "example.ownable" ],
"constructors" : [ ],
"functions" : [ {
"name" : "Set owner",
"description" : "Set contract owner",
"solidity_name" : "setOwner",
"signature" : "setOwner(address)",
"inputs" : [ {
"name" : "New owner",
"description" : "New owner of the contract",
"solidity_name" : "param1",
"solidity_type" : "address",
"recommended_types" : [ ],
"parameters" : [ ],
"hints" : [ ]
} ],
"outputs" : [ ],
"emittable_events" : [ ],
"read_only" : false
}, {
"name" : "Get owner",
"description" : "Get current contract owner",
"solidity_name" : "getOwner",
"signature" : "getOwner()",
"inputs" : [ ],
"outputs" : [ {
"name" : "Current owner",
"description" : "Current owner of the contract",
"solidity_name" : "",
"solidity_type" : "address",
"recommended_types" : [ ],
"parameters" : [ ],
"hints" : [ ]
} ],
"emittable_events" : [ ],
"read_only" : true
} ],
"events" : [ ]
}
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"AbiInputOutput" : {
"type" : "object",
"properties" : {
"components" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/AbiInputOutput"
}
},
"indexed" : {
"type" : [ "boolean", "null" ]
},
"internalType" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string"
}
}
},
"ContractParameter" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"recommended_types" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"solidity_name" : {
"type" : "string"
},
"solidity_type" : {
"type" : "string"
}
}
},
"JsonNode-nullable" : {
"type" : [ "object", "null" ]
},
"ReturnTypeDecorator" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/ReturnTypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"solidityType" : {
"type" : "string"
}
}
},
"TypeDecorator" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"type" : "object",
"properties" : {
"artifact" : {
"type" : "object",
"properties" : {
"abi" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"anonymous" : {
"type" : [ "boolean", "null" ]
},
"inputs" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/AbiInputOutput"
}
},
"name" : {
"type" : [ "string", "null" ]
},
"outputs" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/AbiInputOutput"
}
},
"stateMutability" : {
"type" : [ "string", "null" ]
},
"type" : {
"type" : "string"
}
}
}
},
"bytecode" : {
"type" : "string"
},
"contractName" : {
"type" : "string"
},
"deployedBytecode" : {
"type" : "string"
},
"deployedLinkReferences" : {
"$ref" : "#/$defs/JsonNode-nullable"
},
"linkReferences" : {
"$ref" : "#/$defs/JsonNode-nullable"
},
"sourceName" : {
"type" : "string"
}
}
},
"decorator" : {
"type" : "object",
"properties" : {
"binary" : {
"type" : "string"
},
"constructors" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"inputs" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"payable" : {
"type" : "boolean"
}
}
}
},
"description" : {
"type" : [ "string", "null" ]
},
"events" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"inputs" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"indexed" : {
"type" : "boolean"
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"recommended_types" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"solidity_name" : {
"type" : "string"
},
"solidity_type" : {
"type" : "string"
}
}
}
},
"name" : {
"type" : "string"
},
"signature" : {
"type" : "string"
},
"solidity_name" : {
"type" : "string"
}
}
}
},
"functions" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"emittable_events" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"inputs" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"name" : {
"type" : "string"
},
"outputs" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ContractParameter"
}
},
"read_only" : {
"type" : "boolean"
},
"signature" : {
"type" : "string"
},
"solidity_name" : {
"type" : "string"
}
}
}
},
"id" : {
"type" : "string"
},
"implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : [ "string", "null" ]
},
"tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
},
"manifest" : {
"type" : "object",
"properties" : {
"constructorDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"signature" : {
"type" : "string"
}
}
}
},
"description" : {
"type" : [ "string", "null" ]
},
"eventDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"indexed" : {
"type" : "boolean"
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"signature" : {
"type" : "string"
}
}
}
},
"functionDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"emittableEvents" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"readOnly" : {
"type" : "boolean"
},
"returnDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ReturnTypeDecorator"
}
},
"signature" : {
"type" : "string"
}
}
}
},
"implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : [ "string", "null" ]
},
"tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
}
}
10.3. Import Already Deployed Smart Contract
Imports already deployed smart contract for the specified contract address. Parameters contract_id
, redirect_url
,
arbitrary_data
, screen_config
and all its child fields are optional. arbitrary_data
field can contain any desired
JSON value. Contract import request ID can be interpolated into the redirect_url
by placing ${id}
placeholder in
the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be
interpolated, and only id
field can be interpolated.
If contract_id
field is not provided, then contract binary de-compilation will be attempted in order to generate a
contract decorator for the imported contract.
This request requires an API key present in the X-API-KEY
header.
Request Example
POST /v1/import-smart-contract HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 318
Host: localhost:8080
{
"alias" : "alias",
"contract_id" : "examples.examplecontract",
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: cfe850cc-4c76-4950-a683-98327ec4b5c3
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 6203
{
"id" : "26575e2d-8cf7-45bf-ae85-c2f4032271b0",
"alias" : "alias",
"name" : "name",
"description" : "description",
"status" : "SUCCESS",
"contract_id" : "examples.examplecontract",
"contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
"constructor_params" : [ {
"type" : "address",
"value" : "0x35e13c4870077f4610b74f23e887cbb10e21c19f"
} ],
"contract_tags" : [ "example", "simple" ],
"contract_implements" : [ "traits.example", "traits.exampleownable" ],
"initial_eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-deploy/26575e2d-8cf7-45bf-ae85-c2f4032271b0/action",
"project_id" : "7625a03b-afe5-4022-b6bf-e92f9d7235e7",
"created_at" : "2024-02-23T12:17:01.273617Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"deploy_tx" : {
"tx_hash" : "0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x0000000000000000000000000000000000000000",
"data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
"value" : "0",
"block_confirmations" : "0",
"timestamp" : "2024-02-23T12:15:49Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941\",\"transactionIndex\":0,\"blockHash\":\"0x9d19306bca85596009bf64c04251cc7f12eab340e68a059193b5b417032896d3\",\"blockNumber\":1,\"cumulativeGasUsed\":155308,\"gasUsed\":155308,\"contractAddress\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":null,\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941\",\"blockHash\":\"0x9d19306bca85596009bf64c04251cc7f12eab340e68a059193b5b417032896d3\",\"blockNumber\":1,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x00000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f\",\"type\":null,\"topics\":[\"0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091\",\"0xe412d7b15343cf0762057bcdfc6e0e1196c887a6e48273443abb85a65433a9e2\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000200000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000010000000000000000000040000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000800\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0x25eac\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"cumulativeGasUsedRaw\":\"0x25eac\"}"
},
"imported" : true,
"proxy" : false,
"implementation_contract_address" : null,
"events" : [ {
"signature" : "ExampleEvent(tuple(address),tuple(address))",
"arguments" : [ {
"name" : "nonIndexedStruct",
"type" : "VALUE",
"value" : [ "0x35e13c4870077f4610b74f23e887cbb10e21c19f" ],
"hash" : null
}, {
"name" : "indexedStruct",
"type" : "HASH",
"value" : null,
"hash" : "0xe412d7b15343cf0762057bcdfc6e0e1196c887a6e48273443abb85a65433a9e2"
} ]
} ]
}
Schemas:
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"alias" : {
"type" : "string"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"contract_address" : {
"type" : "string"
},
"contract_id" : {
"type" : [ "string", "null" ]
},
"redirect_url" : {
"type" : [ "string", "null" ]
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
}
}
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"alias" : {
"type" : "string"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"constructor_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"contract_address" : {
"type" : [ "string", "null" ]
},
"contract_deployment_data" : {
"type" : "string"
},
"contract_id" : {
"type" : "string"
},
"contract_implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"contract_tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deploy_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"deployer_address" : {
"type" : [ "string", "null" ]
},
"description" : {
"type" : [ "string", "null" ]
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"implementation_contract_address" : {
"type" : [ "string", "null" ]
},
"imported" : {
"type" : "boolean"
},
"initial_eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"name" : {
"type" : [ "string", "null" ]
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"proxy" : {
"type" : "boolean"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
10.4. Fetch Suggested Interfaces For Imported Smart Contract by Contract Deployment Request ID
Fetches suggested smart contract interfaces for imported smart contract which did not have a specified contract decorator ID. Only interfaces not already implemented by the smart contract will be returned.
Request Example
GET /v1/import-smart-contract/573b7fee-1020-4a2a-9767-0576cc1677f3/suggested-interfaces HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 3e325c17-7b62-42e0-829c-378588c1b499
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1186
{
"manifests" : [ {
"id" : "example.ownable",
"name" : "Example Interface",
"tags" : [ "interface-tag" ],
"description" : "Example smart contract interface",
"event_decorators" : [ ],
"function_decorators" : [ {
"signature" : "setOwner(address)",
"name" : "Set owner",
"description" : "Set contract owner",
"parameterDecorators" : [ {
"name" : "New owner",
"description" : "New owner of the contract",
"recommendedTypes" : [ ],
"parameters" : [ ],
"hints" : [ ]
} ],
"returnDecorators" : [ ],
"emittableEvents" : [ ],
"readOnly" : false
}, {
"signature" : "getOwner()",
"name" : "Get owner",
"description" : "Get current contract owner",
"parameterDecorators" : [ ],
"returnDecorators" : [ {
"name" : "Current owner",
"description" : "Current owner of the contract",
"solidityType" : "address",
"recommendedTypes" : [ ],
"parameters" : [ ],
"hints" : [ ]
} ],
"emittableEvents" : [ ],
"readOnly" : true
} ]
} ],
"best_matching_interfaces" : [ "example.ownable" ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"ReturnTypeDecorator" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/ReturnTypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"solidityType" : {
"type" : "string"
}
}
},
"TypeDecorator" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"type" : "object",
"properties" : {
"best_matching_interfaces" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"manifests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : [ "string", "null" ]
},
"event_decorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"hints" : {
"type" : [ "array", "null" ],
"items" : { }
},
"indexed" : {
"type" : "boolean"
},
"name" : {
"type" : "string"
},
"parameters" : {
"type" : [ "array", "null" ],
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"recommendedTypes" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"signature" : {
"type" : "string"
}
}
}
},
"function_decorators" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"description" : {
"type" : "string"
},
"emittableEvents" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : "string"
},
"parameterDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/TypeDecorator"
}
},
"readOnly" : {
"type" : "boolean"
},
"returnDecorators" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ReturnTypeDecorator"
}
},
"signature" : {
"type" : "string"
}
}
}
},
"id" : {
"type" : "string"
},
"name" : {
"type" : [ "string", "null" ]
},
"tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
}
}
}
10.5. Add Interfaces To Imported Smart Contract by Contract Deployment Request ID
Adds specified interfaces to the imported smart contract. Interfaces can only be added to imported contracts for which the contract decorator was not specified during the import process.
This request requires an API key present in the X-API-KEY
header.
Request Example
PATCH /v1/import-smart-contract/e3437d11-2d92-4c10-88ef-7d7085f467ab/add-interfaces HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 42
Host: localhost:8080
{
"interfaces" : [ "example.ownable" ]
}
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"interfaces" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 8bcf6185-b2a1-4318-80e1-5633963a22e4
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 6480
{
"id" : "e3437d11-2d92-4c10-88ef-7d7085f467ab",
"alias" : "alias",
"name" : "Imported Contract",
"description" : "Imported smart contract.",
"status" : "SUCCESS",
"contract_id" : "imported-0x668ed30aacc7c7c206aaf1327d733226416233e2-31337",
"contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
"constructor_params" : [ {
"type" : "bytes32",
"value" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, -31, 60, 72, 112, 7, 127, 70, 16, -73, 79, 35, -24, -121, -53, -79, 14, 33, -63, -97 ]
} ],
"contract_tags" : [ ],
"contract_implements" : [ "example.ownable" ],
"initial_eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-deploy/e3437d11-2d92-4c10-88ef-7d7085f467ab/action",
"project_id" : "7625a03b-afe5-4022-b6bf-e92f9d7235e7",
"created_at" : "2024-02-23T12:17:04.28842Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"deploy_tx" : {
"tx_hash" : "0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x0000000000000000000000000000000000000000",
"data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
"value" : "0",
"block_confirmations" : "0",
"timestamp" : "2024-02-23T12:15:49Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941\",\"transactionIndex\":0,\"blockHash\":\"0x4695420940f1d15e5f1381d90e9890c9b8010754396d928d9d7128d661402e12\",\"blockNumber\":1,\"cumulativeGasUsed\":155308,\"gasUsed\":155308,\"contractAddress\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":null,\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941\",\"blockHash\":\"0x4695420940f1d15e5f1381d90e9890c9b8010754396d928d9d7128d661402e12\",\"blockNumber\":1,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x00000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f\",\"type\":null,\"topics\":[\"0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091\",\"0xe412d7b15343cf0762057bcdfc6e0e1196c887a6e48273443abb85a65433a9e2\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000200000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000010000000000000000000040000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000800\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0x25eac\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"cumulativeGasUsedRaw\":\"0x25eac\"}"
},
"imported" : true,
"proxy" : false,
"implementation_contract_address" : null,
"events" : [ {
"signature" : null,
"arguments" : [ {
"name" : "arg0",
"type" : "VALUE",
"value" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, -31, 60, 72, 112, 7, 127, 70, 16, -73, 79, 35, -24, -121, -53, -79, 14, 33, -63, -97 ],
"hash" : null
}, {
"name" : "arg1",
"type" : "HASH",
"value" : null,
"hash" : "0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091"
}, {
"name" : "arg2",
"type" : "HASH",
"value" : null,
"hash" : "0xe412d7b15343cf0762057bcdfc6e0e1196c887a6e48273443abb85a65433a9e2"
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"alias" : {
"type" : "string"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"constructor_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"contract_address" : {
"type" : [ "string", "null" ]
},
"contract_deployment_data" : {
"type" : "string"
},
"contract_id" : {
"type" : "string"
},
"contract_implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"contract_tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deploy_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"deployer_address" : {
"type" : [ "string", "null" ]
},
"description" : {
"type" : [ "string", "null" ]
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"implementation_contract_address" : {
"type" : [ "string", "null" ]
},
"imported" : {
"type" : "boolean"
},
"initial_eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"name" : {
"type" : [ "string", "null" ]
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"proxy" : {
"type" : "boolean"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
10.6. Remove Interfaces From Imported Smart Contract by Contract Deployment Request ID
Removes specified interfaces from the imported smart contract. Interfaces can only be removed from imported contracts for which the contract decorator was not specified during the import process.
This request requires an API key present in the X-API-KEY
header.
Request Example
PATCH /v1/import-smart-contract/36e99059-68d7-4fae-831c-89abf363a586/remove-interfaces HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 42
Host: localhost:8080
{
"interfaces" : [ "example.ownable" ]
}
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"interfaces" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 56daf1d6-fa94-4068-b117-f2a9c9ee3b0e
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 6463
{
"id" : "36e99059-68d7-4fae-831c-89abf363a586",
"alias" : "alias",
"name" : "Imported Contract",
"description" : "Imported smart contract.",
"status" : "SUCCESS",
"contract_id" : "imported-0x668ed30aacc7c7c206aaf1327d733226416233e2-31337",
"contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
"constructor_params" : [ {
"type" : "bytes32",
"value" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, -31, 60, 72, 112, 7, 127, 70, 16, -73, 79, 35, -24, -121, -53, -79, 14, 33, -63, -97 ]
} ],
"contract_tags" : [ ],
"contract_implements" : [ ],
"initial_eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-deploy/36e99059-68d7-4fae-831c-89abf363a586/action",
"project_id" : "7625a03b-afe5-4022-b6bf-e92f9d7235e7",
"created_at" : "2024-02-23T12:17:07.940172Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"deploy_tx" : {
"tx_hash" : "0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x0000000000000000000000000000000000000000",
"data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
"value" : "0",
"block_confirmations" : "0",
"timestamp" : "2024-02-23T12:15:49Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941\",\"transactionIndex\":0,\"blockHash\":\"0x2dbc5cfdbcd6d71dfccc7e6b79933199677a58b0f32cec158ea59c0c8c732182\",\"blockNumber\":1,\"cumulativeGasUsed\":155308,\"gasUsed\":155308,\"contractAddress\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":null,\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941\",\"blockHash\":\"0x2dbc5cfdbcd6d71dfccc7e6b79933199677a58b0f32cec158ea59c0c8c732182\",\"blockNumber\":1,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x00000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f\",\"type\":null,\"topics\":[\"0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091\",\"0xe412d7b15343cf0762057bcdfc6e0e1196c887a6e48273443abb85a65433a9e2\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000200000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000010000000000000000000040000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000800\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0x25eac\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"cumulativeGasUsedRaw\":\"0x25eac\"}"
},
"imported" : true,
"proxy" : false,
"implementation_contract_address" : null,
"events" : [ {
"signature" : null,
"arguments" : [ {
"name" : "arg0",
"type" : "VALUE",
"value" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, -31, 60, 72, 112, 7, 127, 70, 16, -73, 79, 35, -24, -121, -53, -79, 14, 33, -63, -97 ],
"hash" : null
}, {
"name" : "arg1",
"type" : "HASH",
"value" : null,
"hash" : "0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091"
}, {
"name" : "arg2",
"type" : "HASH",
"value" : null,
"hash" : "0xe412d7b15343cf0762057bcdfc6e0e1196c887a6e48273443abb85a65433a9e2"
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"alias" : {
"type" : "string"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"constructor_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"contract_address" : {
"type" : [ "string", "null" ]
},
"contract_deployment_data" : {
"type" : "string"
},
"contract_id" : {
"type" : "string"
},
"contract_implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"contract_tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deploy_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"deployer_address" : {
"type" : [ "string", "null" ]
},
"description" : {
"type" : [ "string", "null" ]
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"implementation_contract_address" : {
"type" : [ "string", "null" ]
},
"imported" : {
"type" : "boolean"
},
"initial_eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"name" : {
"type" : [ "string", "null" ]
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"proxy" : {
"type" : "boolean"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
10.7. Set Interfaces For Imported Smart Contract by Contract Deployment Request ID
Sets specified interfaces for the imported smart contract. Interfaces can only be set for imported contracts for which the contract decorator was not specified during the import process.
This request requires an API key present in the X-API-KEY
header.
Request Example
PATCH /v1/import-smart-contract/eb85e624-a556-4b88-bd97-58ce459e0de9/set-interfaces HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 42
Host: localhost:8080
{
"interfaces" : [ "example.ownable" ]
}
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"interfaces" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 6192c35e-87c9-48b5-9507-6b658d21bcb2
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 6481
{
"id" : "eb85e624-a556-4b88-bd97-58ce459e0de9",
"alias" : "alias",
"name" : "Imported Contract",
"description" : "Imported smart contract.",
"status" : "SUCCESS",
"contract_id" : "imported-0x668ed30aacc7c7c206aaf1327d733226416233e2-31337",
"contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
"constructor_params" : [ {
"type" : "bytes32",
"value" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, -31, 60, 72, 112, 7, 127, 70, 16, -73, 79, 35, -24, -121, -53, -79, 14, 33, -63, -97 ]
} ],
"contract_tags" : [ ],
"contract_implements" : [ "example.ownable" ],
"initial_eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-deploy/eb85e624-a556-4b88-bd97-58ce459e0de9/action",
"project_id" : "7625a03b-afe5-4022-b6bf-e92f9d7235e7",
"created_at" : "2024-02-23T12:17:08.956341Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"deploy_tx" : {
"tx_hash" : "0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x0000000000000000000000000000000000000000",
"data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
"value" : "0",
"block_confirmations" : "0",
"timestamp" : "2024-02-23T12:15:49Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941\",\"transactionIndex\":0,\"blockHash\":\"0x6a9e8ec9216835cf64875d69be0b2d702b69667d14b57ed49675ed933ed520d5\",\"blockNumber\":1,\"cumulativeGasUsed\":155308,\"gasUsed\":155308,\"contractAddress\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":null,\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941\",\"blockHash\":\"0x6a9e8ec9216835cf64875d69be0b2d702b69667d14b57ed49675ed933ed520d5\",\"blockNumber\":1,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x00000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f\",\"type\":null,\"topics\":[\"0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091\",\"0xe412d7b15343cf0762057bcdfc6e0e1196c887a6e48273443abb85a65433a9e2\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000200000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000010000000000000000000040000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000800\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0x25eac\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"cumulativeGasUsedRaw\":\"0x25eac\"}"
},
"imported" : true,
"proxy" : false,
"implementation_contract_address" : null,
"events" : [ {
"signature" : null,
"arguments" : [ {
"name" : "arg0",
"type" : "VALUE",
"value" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, -31, 60, 72, 112, 7, 127, 70, 16, -73, 79, 35, -24, -121, -53, -79, 14, 33, -63, -97 ],
"hash" : null
}, {
"name" : "arg1",
"type" : "HASH",
"value" : null,
"hash" : "0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091"
}, {
"name" : "arg2",
"type" : "HASH",
"value" : null,
"hash" : "0xe412d7b15343cf0762057bcdfc6e0e1196c887a6e48273443abb85a65433a9e2"
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"alias" : {
"type" : "string"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"constructor_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"contract_address" : {
"type" : [ "string", "null" ]
},
"contract_deployment_data" : {
"type" : "string"
},
"contract_id" : {
"type" : "string"
},
"contract_implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"contract_tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deploy_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"deployer_address" : {
"type" : [ "string", "null" ]
},
"description" : {
"type" : [ "string", "null" ]
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"implementation_contract_address" : {
"type" : [ "string", "null" ]
},
"imported" : {
"type" : "boolean"
},
"initial_eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"name" : {
"type" : [ "string", "null" ]
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"proxy" : {
"type" : "boolean"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
10.8. Fetch Contract Deployment Request by ID
Fetches stored contract deployment request with its current status. The request is considered successful if the attached
transaction is confirmed on blockchain and all its data matches specified request parameters (correct to
and from
addresses, amount
, matching data
and tx_hash
). If there are any mismatches between specified request data and
state on blockchain, the request will be marked as failed. If there is no attached transaction hash or if transaction
for attached hash is not yet mined on blockchain, request will be in pending state.
Request Example
GET /v1/deploy/ba762417-05b8-47ad-ab04-0edb5ba78b34 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 061a967e-53c9-4ae2-8f82-d35436b4d7be
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 6204
{
"id" : "ba762417-05b8-47ad-ab04-0edb5ba78b34",
"alias" : "alias",
"name" : "name",
"description" : "description",
"status" : "SUCCESS",
"contract_id" : "examples.examplecontract",
"contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
"constructor_params" : [ {
"type" : "address",
"value" : "0x000000000000000000000000000000000000000a"
} ],
"contract_tags" : [ "example", "simple" ],
"contract_implements" : [ "traits.example", "traits.exampleownable" ],
"initial_eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-deploy/ba762417-05b8-47ad-ab04-0edb5ba78b34/action",
"project_id" : "9a418cf4-c4ee-4550-9490-9bcaf5c1a99d",
"created_at" : "2024-02-23T12:16:43.264255Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"deploy_tx" : {
"tx_hash" : "0xd3f6dcf206b2755ca7f932eda9561c777859aec1d3d4421f276bca5bc94f0ee1",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x0000000000000000000000000000000000000000",
"data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:49Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0xd3f6dcf206b2755ca7f932eda9561c777859aec1d3d4421f276bca5bc94f0ee1\",\"transactionIndex\":0,\"blockHash\":\"0xd03ecc880bc51e75edc16d5316cd09116610212305174cc1913ae68185adc6e1\",\"blockNumber\":1,\"cumulativeGasUsed\":155080,\"gasUsed\":155080,\"contractAddress\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":null,\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0xd3f6dcf206b2755ca7f932eda9561c777859aec1d3d4421f276bca5bc94f0ee1\",\"blockHash\":\"0xd03ecc880bc51e75edc16d5316cd09116610212305174cc1913ae68185adc6e1\",\"blockNumber\":1,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091\",\"0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000200000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000040000000000000000000000000000000000000000010000000000000000000000000000000000000000200000000000000000000000800\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0x25dc8\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"cumulativeGasUsedRaw\":\"0x25dc8\"}"
},
"imported" : false,
"proxy" : false,
"implementation_contract_address" : null,
"events" : [ {
"signature" : "ExampleEvent(tuple(address),tuple(address))",
"arguments" : [ {
"name" : "nonIndexedStruct",
"type" : "VALUE",
"value" : [ "0x000000000000000000000000000000000000000a" ],
"hash" : null
}, {
"name" : "indexedStruct",
"type" : "HASH",
"value" : null,
"hash" : "0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8"
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"alias" : {
"type" : "string"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"constructor_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"contract_address" : {
"type" : [ "string", "null" ]
},
"contract_deployment_data" : {
"type" : "string"
},
"contract_id" : {
"type" : "string"
},
"contract_implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"contract_tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deploy_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"deployer_address" : {
"type" : [ "string", "null" ]
},
"description" : {
"type" : [ "string", "null" ]
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"implementation_contract_address" : {
"type" : [ "string", "null" ]
},
"imported" : {
"type" : "boolean"
},
"initial_eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"name" : {
"type" : [ "string", "null" ]
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"proxy" : {
"type" : "boolean"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
10.9. Fetch Contract Deployment Requests by Project ID and Contract Alias
Fetches contract deployment request for given project ID and contract alias.
Request Example
GET /v1/deploy/by-project/9a418cf4-c4ee-4550-9490-9bcaf5c1a99d/by-alias/alias HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 1f84e696-95da-4121-a67b-3b712341097e
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 6204
{
"id" : "f1b9a58a-3b5a-4a2c-95be-80b9196af6e2",
"alias" : "alias",
"name" : "name",
"description" : "description",
"status" : "SUCCESS",
"contract_id" : "examples.examplecontract",
"contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
"constructor_params" : [ {
"type" : "address",
"value" : "0x000000000000000000000000000000000000000a"
} ],
"contract_tags" : [ "example", "simple" ],
"contract_implements" : [ "traits.example", "traits.exampleownable" ],
"initial_eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-deploy/f1b9a58a-3b5a-4a2c-95be-80b9196af6e2/action",
"project_id" : "9a418cf4-c4ee-4550-9490-9bcaf5c1a99d",
"created_at" : "2024-02-23T12:16:43.456235Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"deploy_tx" : {
"tx_hash" : "0xd3f6dcf206b2755ca7f932eda9561c777859aec1d3d4421f276bca5bc94f0ee1",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x0000000000000000000000000000000000000000",
"data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:49Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0xd3f6dcf206b2755ca7f932eda9561c777859aec1d3d4421f276bca5bc94f0ee1\",\"transactionIndex\":0,\"blockHash\":\"0xdf55bd5623e61666ef2aa6dad33abff927ab1d750671a34759cdf01f5f3daab9\",\"blockNumber\":1,\"cumulativeGasUsed\":155080,\"gasUsed\":155080,\"contractAddress\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":null,\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0xd3f6dcf206b2755ca7f932eda9561c777859aec1d3d4421f276bca5bc94f0ee1\",\"blockHash\":\"0xdf55bd5623e61666ef2aa6dad33abff927ab1d750671a34759cdf01f5f3daab9\",\"blockNumber\":1,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091\",\"0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000200000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000040000000000000000000000000000000000000000010000000000000000000000000000000000000000200000000000000000000000800\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0x25dc8\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"cumulativeGasUsedRaw\":\"0x25dc8\"}"
},
"imported" : false,
"proxy" : false,
"implementation_contract_address" : null,
"events" : [ {
"signature" : "ExampleEvent(tuple(address),tuple(address))",
"arguments" : [ {
"name" : "nonIndexedStruct",
"type" : "VALUE",
"value" : [ "0x000000000000000000000000000000000000000a" ],
"hash" : null
}, {
"name" : "indexedStruct",
"type" : "HASH",
"value" : null,
"hash" : "0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8"
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"alias" : {
"type" : "string"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"constructor_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"contract_address" : {
"type" : [ "string", "null" ]
},
"contract_deployment_data" : {
"type" : "string"
},
"contract_id" : {
"type" : "string"
},
"contract_implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"contract_tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deploy_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"deployer_address" : {
"type" : [ "string", "null" ]
},
"description" : {
"type" : [ "string", "null" ]
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"implementation_contract_address" : {
"type" : [ "string", "null" ]
},
"imported" : {
"type" : "boolean"
},
"initial_eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"name" : {
"type" : [ "string", "null" ]
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"proxy" : {
"type" : "boolean"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
10.10. Fetch Contract Deployment Requests by Project ID and Filters
Fetches stored contract deployment requests with their current status filtered by project ID and other filters.
Query Parameters
Parameter | Description |
---|---|
|
Comma separated list of contract IDs to filter by. Each list element act as an |
|
Comma separated list of contract tags to filter by. Individual elements can contain multiple contract tags separated by
Example: |
|
Comma separated list of implemented contract traits to filter by. Individual elements can contain multiple implemented
contract traits separated by |
|
If set to |
Request Example
GET /v1/deploy/by-project/9a418cf4-c4ee-4550-9490-9bcaf5c1a99d?contractIds=examples.examplecontract&contractTags=example%20AND%20simple,other&contractImplements=traits/example%20AND%20traits/exampleOwnable,traits/other&deployedOnly=true HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 3fa46702-ebe8-4ef2-84b3-52c7361b3c7b
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 6337
{
"requests" : [ {
"id" : "cef61f99-ad51-415b-ab85-bf02a9197fbf",
"alias" : "alias",
"name" : "name",
"description" : "description",
"status" : "SUCCESS",
"contract_id" : "examples.examplecontract",
"contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
"constructor_params" : [ {
"type" : "address",
"value" : "0x000000000000000000000000000000000000000a"
} ],
"contract_tags" : [ "example", "simple" ],
"contract_implements" : [ "traits.example", "traits.exampleownable" ],
"initial_eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-deploy/cef61f99-ad51-415b-ab85-bf02a9197fbf/action",
"project_id" : "9a418cf4-c4ee-4550-9490-9bcaf5c1a99d",
"created_at" : "2024-02-23T12:16:44.123272Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"deploy_tx" : {
"tx_hash" : "0xd3f6dcf206b2755ca7f932eda9561c777859aec1d3d4421f276bca5bc94f0ee1",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x0000000000000000000000000000000000000000",
"data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:49Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0xd3f6dcf206b2755ca7f932eda9561c777859aec1d3d4421f276bca5bc94f0ee1\",\"transactionIndex\":0,\"blockHash\":\"0xa7db0e122a8d0b107954f6ec68973e1e813f0ea92d38dc155247d22a2e4cf716\",\"blockNumber\":1,\"cumulativeGasUsed\":155080,\"gasUsed\":155080,\"contractAddress\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":null,\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0xd3f6dcf206b2755ca7f932eda9561c777859aec1d3d4421f276bca5bc94f0ee1\",\"blockHash\":\"0xa7db0e122a8d0b107954f6ec68973e1e813f0ea92d38dc155247d22a2e4cf716\",\"blockNumber\":1,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000000000000000000000000000000000000000000a\",\"type\":null,\"topics\":[\"0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091\",\"0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000200000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000040000000000000000000000000000000000000000010000000000000000000000000000000000000000200000000000000000000000800\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0x25dc8\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x1\",\"cumulativeGasUsedRaw\":\"0x25dc8\"}"
},
"imported" : false,
"proxy" : false,
"implementation_contract_address" : null,
"events" : [ {
"signature" : "ExampleEvent(tuple(address),tuple(address))",
"arguments" : [ {
"name" : "nonIndexedStruct",
"type" : "VALUE",
"value" : [ "0x000000000000000000000000000000000000000a" ],
"hash" : null
}, {
"name" : "indexedStruct",
"type" : "HASH",
"value" : null,
"hash" : "0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8"
} ]
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"requests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"alias" : {
"type" : "string"
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"constructor_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"contract_address" : {
"type" : [ "string", "null" ]
},
"contract_deployment_data" : {
"type" : "string"
},
"contract_id" : {
"type" : "string"
},
"contract_implements" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"contract_tags" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deploy_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"deployer_address" : {
"type" : [ "string", "null" ]
},
"description" : {
"type" : [ "string", "null" ]
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"implementation_contract_address" : {
"type" : [ "string", "null" ]
},
"imported" : {
"type" : "boolean"
},
"initial_eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"name" : {
"type" : [ "string", "null" ]
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"proxy" : {
"type" : "boolean"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
}
}
}
10.11. Attach Transaction Info to Contract Deployment Request
Attaches transaction hash and deployer wallet address to existing contract deployment request. Once the transaction hash is attached to the request, any subsequent attempts to attach a new transaction hash will fail.
Request Example
PUT /v1/deploy/817bff48-0659-47db-888e-eec43bfd37d5 HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080
{
"tx_hash" : "0x1",
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"caller_address" : {
"type" : "string"
},
"tx_hash" : {
"type" : "string"
}
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 7e9df3c8-364e-4eca-ba4e-332a5e674540
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
10.12. Delete Contract Deployment Request by ID
Deletes created contract deployment request by ID. Only the request creator can delete the contract deployment request.
This request requires an API key present in the X-API-KEY
header.
Request Example
DELETE /v1/deploy/7cdb0dcb-344c-4e7f-872b-72d464a4e75b HTTP/1.1
X-API-KEY: api-key
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: ad7c7ef5-d974-4954-8f71-88dbe8788147
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
11. Contract Function Call Request API
All endpoints are public and do not require Authorization: Bearer JWT
header.
11.1. Call Read-Only Contract Function Request
Calls read-only contract function with specified parameters. Parameter block_number
is optional.
Target contract can be specified by providing deployed_contract_id
, deployed_contract_alias
or contract_address
in
the request body. Exactly one of the mentioned values must be provided, otherwise the request will be considered
invalid. The deployed_contract_id
and deployed_contract_alias
correspond to ID or alias of the contract which was
deployed using the Contract Deployment Request API. If contract_address
is used to specify target contract, then
deployed_contract_id
will have null
value in the response.
The function_params
field is an array of objects which must have type
and value
according to the table in
section Available Function Argument Types.
Either function_name
and function_params
or only function_call_data
must be present in the request body.
The output_params
field is an array of output parameter types, which correspond to the type name according to the table
in section Available Function Argument Types. Tuple types are constructed by providing an object instead of type
name, for example {"type": "tuple", "elems": ["uint", "string"]}
is a tuple with element types of uint
and
string
. Tuple nesting is possible by providing the appropriate value in the elem
array. Any array dimensions of
the tuple must be expressed in its type
field, for example {"type": "tuple[]", "elems": ["uint", "string"]}
defines an array of tuples with element types of uint
and string
.
This request requires an API key present in the X-API-KEY
header.
Request Example (via deployed_contract_id
)
POST /v1/readonly-function-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 308
Host: localhost:8080
{
"deployed_contract_id" : "645d9a43-5884-47c4-a0ee-8bafc3ae0110",
"block_number" : "1",
"function_name" : "returningUint",
"function_params" : [ {
"type" : "uint256",
"value" : "10"
} ],
"output_params" : [ "uint256" ],
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via deployed_contract_alias
)
POST /v1/readonly-function-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 289
Host: localhost:8080
{
"deployed_contract_alias" : "contract-alias",
"block_number" : "1",
"function_name" : "returningUint",
"function_params" : [ {
"type" : "uint256",
"value" : "10"
} ],
"output_params" : [ "uint256" ],
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via contract_address
)
POST /v1/readonly-function-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 310
Host: localhost:8080
{
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"block_number" : "1",
"function_name" : "returningUint",
"function_params" : [ {
"type" : "uint256",
"value" : "10"
} ],
"output_params" : [ "uint256" ],
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: e88cd25e-d0f5-4b03-a7b4-0120e0b38a43
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 360
{
"deployed_contract_id" : "645d9a43-5884-47c4-a0ee-8bafc3ae0110",
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"block_number" : "1",
"timestamp" : "2024-02-23T12:15:49Z",
"output_params" : [ "uint256" ],
"return_values" : [ "10" ],
"raw_return_value" : "0x000000000000000000000000000000000000000000000000000000000000000a"
}
Schemas:
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
},
"OutputParameterSchema" : {
"type" : "object",
"properties" : {
"elems" : {
"type" : "array",
"items" : {
"anyOf" : [ {
"$ref" : "#/$defs/OutputParameterSchema"
}, {
"type" : "string"
} ]
}
},
"type" : {
"type" : "string"
}
}
}
},
"type" : "object",
"properties" : {
"block_number" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"caller_address" : {
"type" : "string"
},
"contract_address" : {
"type" : [ "string", "null" ]
},
"deployed_contract_alias" : {
"type" : [ "string", "null" ]
},
"deployed_contract_id" : {
"type" : [ "string", "null" ],
"format" : "uuid"
},
"function_call_data" : {
"type" : [ "string", "null" ]
},
"function_name" : {
"type" : [ "string", "null" ]
},
"function_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"output_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/OutputParameterSchema"
}
}
}
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"OutputParameterSchema" : {
"type" : "object",
"properties" : {
"elems" : {
"type" : "array",
"items" : {
"anyOf" : [ {
"$ref" : "#/$defs/OutputParameterSchema"
}, {
"type" : "string"
} ]
}
},
"type" : {
"type" : "string"
}
}
},
"ReturnValueTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ReturnValueTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"block_number" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"contract_address" : {
"type" : "string"
},
"deployed_contract_id" : {
"type" : [ "string", "null" ],
"format" : "uuid"
},
"output_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/OutputParameterSchema"
}
},
"raw_return_value" : {
"type" : "string"
},
"return_values" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ReturnValueTypes"
}
},
"timestamp" : {
"type" : "string",
"format" : "date-time"
}
}
}
11.2. Create Contract Function Call Request
Creates contract function call request with specified parameters. Parameters redirect_url
, caller_address
,
arbitrary_data
, screen_config
and all its child fields are optional. arbitrary_data
field can contain any desired
JSON value. Contract function call request ID can be interpolated into the redirect_url
by placing ${id}
placeholder
in the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be
interpolated, and only id
field can be interpolated.
Target contract can be specified by providing deployed_contract_id
, deployed_contract_alias
or contract_address
in
the request body. Exactly one of the mentioned values must be provided, otherwise the request will be considered
invalid. The deployed_contract_id
and deployed_contract_alias
correspond to ID or alias of the contract which was
deployed using the Contract Deployment Request API. If contract_address
is used to specify target contract, then
deployed_contract_id
will have null
value in the response.
The functionParams
field is an array of objects which must have type
and value
according to the table in
section Available Function Argument Types.
This request requires an API key present in the X-API-KEY
header.
Request Example (via deployed_contract_id
)
POST /v1/function-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 486
Host: localhost:8080
{
"deployed_contract_id" : "96056af8-df72-4897-afa2-bcb5c412b1a7",
"function_name" : "setOwner",
"function_params" : [ {
"type" : "address",
"value" : "0x000000000000000000000000000000000000000b"
} ],
"eth_amount" : "0",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via deployed_contract_alias
)
POST /v1/function-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 467
Host: localhost:8080
{
"deployed_contract_alias" : "contract-alias",
"function_name" : "setOwner",
"function_params" : [ {
"type" : "address",
"value" : "0x000000000000000000000000000000000000000b"
} ],
"eth_amount" : "0",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via contract_address
)
POST /v1/function-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 488
Host: localhost:8080
{
"contract_address" : "0x00000000000000000000000000000000cafebabe",
"function_name" : "setOwner",
"function_params" : [ {
"type" : "address",
"value" : "0x000000000000000000000000000000000000000b"
} ],
"eth_amount" : "0",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: fc848909-f114-4e3f-ac8b-3e2ced818bfe
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1362
{
"id" : "2bca5f62-17f5-459a-94c5-b67ed1cf4b32",
"status" : "PENDING",
"deployed_contract_id" : "96056af8-df72-4897-afa2-bcb5c412b1a7",
"contract_address" : "0x00000000000000000000000000000000cafebabe",
"function_name" : "setOwner",
"function_params" : [ {
"type" : "address",
"value" : "0x000000000000000000000000000000000000000b"
} ],
"function_call_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
"eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-function-call/2bca5f62-17f5-459a-94c5-b67ed1cf4b32/action",
"project_id" : "8fc32eb0-27fd-4569-a80e-8cdfd2b7012b",
"created_at" : "2024-02-23T12:16:46.734293Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"caller_address" : "0x000000000000000000000000000000000000000b",
"function_call_tx" : {
"tx_hash" : null,
"from" : "0x000000000000000000000000000000000000000b",
"to" : "0x00000000000000000000000000000000cafebabe",
"data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
"value" : "0",
"block_confirmations" : null,
"timestamp" : null,
"raw_rpc_transaction_receipt" : null
},
"events" : null
}
Schemas:
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"caller_address" : {
"type" : [ "string", "null" ]
},
"contract_address" : {
"type" : [ "string", "null" ]
},
"deployed_contract_alias" : {
"type" : [ "string", "null" ]
},
"deployed_contract_id" : {
"type" : [ "string", "null" ],
"format" : "uuid"
},
"eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"function_name" : {
"type" : "string"
},
"function_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"redirect_url" : {
"type" : [ "string", "null" ]
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
}
}
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"caller_address" : {
"type" : [ "string", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"contract_address" : {
"type" : "string"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deployed_contract_id" : {
"type" : [ "string", "null" ],
"format" : "uuid"
},
"eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"function_call_data" : {
"type" : "string"
},
"function_call_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"function_name" : {
"type" : "string"
},
"function_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
11.3. Fetch Contract Function Call Request by ID
Fetches stored contract function call request with its current status. The request is considered successful if the
attached transaction is confirmed on blockchain and all its data matches specified request parameters (correct to
and
from
addresses, amount
, matching data
and tx_hash
). If there are any mismatches between specified request data
and state on blockchain, the request will be marked as failed. If there is no attached transaction hash or if
transaction for attached hash is not yet mined on blockchain, request will be in pending state.
Request Example
GET /v1/function-call/f5b6f601-f627-48f5-bd75-7e37ae6f2628 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 0ee72301-ade7-4d18-8051-ad11eca98c70
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3680
{
"id" : "f5b6f601-f627-48f5-bd75-7e37ae6f2628",
"status" : "SUCCESS",
"deployed_contract_id" : "96056af8-df72-4897-afa2-bcb5c412b1a7",
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"function_name" : "setOwner",
"function_params" : [ {
"type" : "address",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1"
} ],
"function_call_data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-function-call/f5b6f601-f627-48f5-bd75-7e37ae6f2628/action",
"project_id" : "8fc32eb0-27fd-4569-a80e-8cdfd2b7012b",
"created_at" : "2024-02-23T12:16:47.600437Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"caller_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"function_call_tx" : {
"tx_hash" : "0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:50Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f\",\"transactionIndex\":0,\"blockHash\":\"0x684c6bdc9522cd8dc66a3ec0f3d94577757d0e40fcb420afaf5b8188b3714350\",\"blockNumber\":2,\"cumulativeGasUsed\":28348,\"gasUsed\":28348,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f\",\"blockHash\":\"0x684c6bdc9522cd8dc66a3ec0f3d94577757d0e40fcb420afaf5b8188b3714350\",\"blockNumber\":2,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"type\":null,\"topics\":[\"0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091\",\"0xb3ab459503754d7ffbceb026c9a12971f082734e588c5e09df0875237fd918a2\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000080000010000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000800\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0x6ebc\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"cumulativeGasUsedRaw\":\"0x6ebc\"}"
},
"events" : [ {
"signature" : "ExampleEvent(tuple(address),tuple(address))",
"arguments" : [ {
"name" : "nonIndexedStruct",
"type" : "VALUE",
"value" : [ "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1" ],
"hash" : null
}, {
"name" : "indexedStruct",
"type" : "HASH",
"value" : null,
"hash" : "0xb3ab459503754d7ffbceb026c9a12971f082734e588c5e09df0875237fd918a2"
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"caller_address" : {
"type" : [ "string", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"contract_address" : {
"type" : "string"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deployed_contract_id" : {
"type" : [ "string", "null" ],
"format" : "uuid"
},
"eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"function_call_data" : {
"type" : "string"
},
"function_call_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"function_name" : {
"type" : "string"
},
"function_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
11.4. Fetch Contract Function Call Requests by Project ID and Filters
Fetches stored contract function call requests with their current status filtered by project ID and other filters.
Query Parameters
Parameter | Description |
---|---|
|
ID of the deployed contract to filter by. |
|
Address of the contract to filter by. |
Request Example
GET /v1/function-call/by-project/8fc32eb0-27fd-4569-a80e-8cdfd2b7012b?deployedContractId=96056af8-df72-4897-afa2-bcb5c412b1a7&contractAddress=0x668ed30aacc7c7c206aaf1327d733226416233e2 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: d5c5f66c-2031-42ca-ab2b-b917e9e89aa4
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3799
{
"requests" : [ {
"id" : "c6825320-dc09-4a11-8d20-b264cd2ca4b1",
"status" : "SUCCESS",
"deployed_contract_id" : "96056af8-df72-4897-afa2-bcb5c412b1a7",
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"function_name" : "setOwner",
"function_params" : [ {
"type" : "address",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1"
} ],
"function_call_data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-function-call/c6825320-dc09-4a11-8d20-b264cd2ca4b1/action",
"project_id" : "8fc32eb0-27fd-4569-a80e-8cdfd2b7012b",
"created_at" : "2024-02-23T12:16:47.381531Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"caller_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"function_call_tx" : {
"tx_hash" : "0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:50Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f\",\"transactionIndex\":0,\"blockHash\":\"0x7d1dab628d58ff94354dbaae58db316c18a408be71e4281e9004ab1b007d9951\",\"blockNumber\":2,\"cumulativeGasUsed\":28348,\"gasUsed\":28348,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f\",\"blockHash\":\"0x7d1dab628d58ff94354dbaae58db316c18a408be71e4281e9004ab1b007d9951\",\"blockNumber\":2,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"type\":null,\"topics\":[\"0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091\",\"0xb3ab459503754d7ffbceb026c9a12971f082734e588c5e09df0875237fd918a2\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000080000010000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000800\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0x6ebc\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"cumulativeGasUsedRaw\":\"0x6ebc\"}"
},
"events" : [ {
"signature" : "ExampleEvent(tuple(address),tuple(address))",
"arguments" : [ {
"name" : "nonIndexedStruct",
"type" : "VALUE",
"value" : [ "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1" ],
"hash" : null
}, {
"name" : "indexedStruct",
"type" : "HASH",
"value" : null,
"hash" : "0xb3ab459503754d7ffbceb026c9a12971f082734e588c5e09df0875237fd918a2"
} ]
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"requests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"caller_address" : {
"type" : [ "string", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"contract_address" : {
"type" : "string"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deployed_contract_id" : {
"type" : [ "string", "null" ],
"format" : "uuid"
},
"eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"function_call_data" : {
"type" : "string"
},
"function_call_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"function_name" : {
"type" : "string"
},
"function_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
}
}
}
11.5. Attach Transaction Info to Contract Function Call Request
Attaches transaction hash and caller wallet address to existing contract function call request. Once the transaction hash is attached to the request, any subsequent attempts to attach a new transaction hash will fail.
Request Example
PUT /v1/function-call/e164ffc6-3e6b-4eee-8616-d328a7217764 HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080
{
"tx_hash" : "0x1",
"caller_address" : "0x000000000000000000000000000000000000000c"
}
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"caller_address" : {
"type" : "string"
},
"tx_hash" : {
"type" : "string"
}
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: d32adab7-8272-470a-84ac-3fe42a7974c7
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
12. Contract Arbitrary Call Request API
All endpoints are public and do not require Authorization: Bearer JWT
header.
12.1. Create Contract Arbitrary Call Request
Creates contract arbitrary call request with specified parameters. Parameters redirect_url
, caller_address
,
arbitrary_data
, screen_config
and all its child fields are optional. arbitrary_data
field can contain any desired
JSON value. Contract arbitrary call request ID can be interpolated into the redirect_url
by placing ${id}
placeholder in the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and
brackets to be interpolated, and only id
field can be interpolated.
Target contract can be specified by providing deployed_contract_id
, deployed_contract_alias
or contract_address
in
the request body. Exactly one of the mentioned values must be provided, otherwise the request will be considered
invalid. The deployed_contract_id
and deployed_contract_alias
correspond to ID or alias of the contract which was
deployed using the Contract Deployment Request API. If contract_address
is used to specify target contract, then
deployed_contract_id
will have null
value in the response.
This request requires an API key present in the X-API-KEY
header.
Request Example (via deployed_contract_id
)
POST /v1/arbitrary-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 436
Host: localhost:8080
{
"deployed_contract_id" : "34743442-462e-4dbc-b32f-e2c411b4eecb",
"function_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
"eth_amount" : "0",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via deployed_contract_alias
)
POST /v1/arbitrary-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 417
Host: localhost:8080
{
"deployed_contract_alias" : "contract-alias",
"function_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
"eth_amount" : "0",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via contract_address
)
POST /v1/arbitrary-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 438
Host: localhost:8080
{
"contract_address" : "0x00000000000000000000000000000000cafebabe",
"function_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
"eth_amount" : "0",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 21e29f3a-ab63-4f98-8160-16e76909c8ad
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1364
{
"id" : "59926c74-3945-4887-8b73-cfc8dabdf874",
"status" : "PENDING",
"deployed_contract_id" : "34743442-462e-4dbc-b32f-e2c411b4eecb",
"contract_address" : "0x00000000000000000000000000000000cafebabe",
"function_name" : "setOwner",
"function_params" : [ {
"type" : "address",
"value" : "0x000000000000000000000000000000000000000b"
} ],
"function_call_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
"eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-arbitrary-call/59926c74-3945-4887-8b73-cfc8dabdf874/action",
"project_id" : "3108ff9c-64cc-4219-bbb0-2e6b137552db",
"created_at" : "2024-02-23T12:16:36.289627Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"caller_address" : "0x000000000000000000000000000000000000000b",
"arbitrary_call_tx" : {
"tx_hash" : null,
"from" : "0x000000000000000000000000000000000000000b",
"to" : "0x00000000000000000000000000000000cafebabe",
"data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
"value" : "0",
"block_confirmations" : null,
"timestamp" : null,
"raw_rpc_transaction_receipt" : null
},
"events" : null
}
Schemas:
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"caller_address" : {
"type" : [ "string", "null" ]
},
"contract_address" : {
"type" : [ "string", "null" ]
},
"deployed_contract_alias" : {
"type" : [ "string", "null" ]
},
"deployed_contract_id" : {
"type" : [ "string", "null" ],
"format" : "uuid"
},
"eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"function_data" : {
"type" : "string"
},
"redirect_url" : {
"type" : [ "string", "null" ]
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
}
}
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"arbitrary_call_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"caller_address" : {
"type" : [ "string", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"contract_address" : {
"type" : "string"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deployed_contract_id" : {
"type" : [ "string", "null" ],
"format" : "uuid"
},
"eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"function_call_data" : {
"type" : "string"
},
"function_name" : {
"type" : [ "string", "null" ]
},
"function_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
12.2. Fetch Contract Arbitrary Call Request by ID
Fetches stored contract arbitrary call request with its current status. The request is considered successful if the
attached transaction is confirmed on blockchain and all its data matches specified request parameters (correct to
and
from
addresses, amount
, matching data
and tx_hash
). If there are any mismatches between specified request data
and state on blockchain, the request will be marked as failed. If there is no attached transaction hash or if
transaction for attached hash is not yet mined on blockchain, request will be in pending state.
Request Example
GET /v1/arbitrary-call/b9debec0-b0b3-40a9-a5f1-523f552b05c3 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 3aa8264b-33aa-42df-b6d9-28dffab2e88b
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3682
{
"id" : "b9debec0-b0b3-40a9-a5f1-523f552b05c3",
"status" : "SUCCESS",
"deployed_contract_id" : "34743442-462e-4dbc-b32f-e2c411b4eecb",
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"function_name" : "setOwner",
"function_params" : [ {
"type" : "address",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1"
} ],
"function_call_data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-arbitrary-call/b9debec0-b0b3-40a9-a5f1-523f552b05c3/action",
"project_id" : "3108ff9c-64cc-4219-bbb0-2e6b137552db",
"created_at" : "2024-02-23T12:16:36.743443Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"caller_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"arbitrary_call_tx" : {
"tx_hash" : "0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:50Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f\",\"transactionIndex\":0,\"blockHash\":\"0x7e61359ae4561ebb7390a02d97bcd7d69191fa5116fd57b26b2612ec4650ac87\",\"blockNumber\":2,\"cumulativeGasUsed\":28348,\"gasUsed\":28348,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f\",\"blockHash\":\"0x7e61359ae4561ebb7390a02d97bcd7d69191fa5116fd57b26b2612ec4650ac87\",\"blockNumber\":2,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"type\":null,\"topics\":[\"0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091\",\"0xb3ab459503754d7ffbceb026c9a12971f082734e588c5e09df0875237fd918a2\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000080000010000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000800\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0x6ebc\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"cumulativeGasUsedRaw\":\"0x6ebc\"}"
},
"events" : [ {
"signature" : "ExampleEvent(tuple(address),tuple(address))",
"arguments" : [ {
"name" : "nonIndexedStruct",
"type" : "VALUE",
"value" : [ "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1" ],
"hash" : null
}, {
"name" : "indexedStruct",
"type" : "HASH",
"value" : null,
"hash" : "0xb3ab459503754d7ffbceb026c9a12971f082734e588c5e09df0875237fd918a2"
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"arbitrary_call_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"caller_address" : {
"type" : [ "string", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"contract_address" : {
"type" : "string"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deployed_contract_id" : {
"type" : [ "string", "null" ],
"format" : "uuid"
},
"eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"function_call_data" : {
"type" : "string"
},
"function_name" : {
"type" : [ "string", "null" ]
},
"function_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
12.3. Fetch Contract Arbitrary Call Requests by Project ID and Filters
Fetches stored contract arbitrary call requests with their current status filtered by project ID and other filters.
Query Parameters
Parameter | Description |
---|---|
|
ID of the deployed contract to filter by. |
|
Address of the contract to filter by. |
Request Example
GET /v1/arbitrary-call/by-project/3108ff9c-64cc-4219-bbb0-2e6b137552db?deployedContractId=34743442-462e-4dbc-b32f-e2c411b4eecb&contractAddress=0x668ed30aacc7c7c206aaf1327d733226416233e2 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: eef39a18-a70f-4cc4-a9d0-596ca5f0c951
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3801
{
"requests" : [ {
"id" : "684d04b5-73bc-4b61-a69c-059cec616da5",
"status" : "SUCCESS",
"deployed_contract_id" : "34743442-462e-4dbc-b32f-e2c411b4eecb",
"contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"function_name" : "setOwner",
"function_params" : [ {
"type" : "address",
"value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1"
} ],
"function_call_data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"eth_amount" : "0",
"chain_id" : 31337,
"redirect_url" : "https://example.com/request-arbitrary-call/684d04b5-73bc-4b61-a69c-059cec616da5/action",
"project_id" : "3108ff9c-64cc-4219-bbb0-2e6b137552db",
"created_at" : "2024-02-23T12:16:34.518285Z",
"arbitrary_data" : {
"test" : true
},
"screen_config" : {
"before_action_message" : "before-action-message",
"after_action_message" : "after-action-message"
},
"caller_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"arbitrary_call_tx" : {
"tx_hash" : "0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f",
"from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
"data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
"value" : "0",
"block_confirmations" : "1",
"timestamp" : "2024-02-23T12:15:50Z",
"raw_rpc_transaction_receipt" : "{\"transactionHash\":\"0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f\",\"transactionIndex\":0,\"blockHash\":\"0x50d9f0f1b234ff79d385cdbe9f1c341c23d0326176ba0326a38d95feddb7b8ac\",\"blockNumber\":2,\"cumulativeGasUsed\":28348,\"gasUsed\":28348,\"contractAddress\":null,\"root\":null,\"status\":\"0x1\",\"from\":\"0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"to\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"logs\":[{\"removed\":false,\"logIndex\":0,\"transactionIndex\":0,\"transactionHash\":\"0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f\",\"blockHash\":\"0x50d9f0f1b234ff79d385cdbe9f1c341c23d0326176ba0326a38d95feddb7b8ac\",\"blockNumber\":2,\"address\":\"0x668ed30aacc7c7c206aaf1327d733226416233e2\",\"data\":\"0x000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1\",\"type\":null,\"topics\":[\"0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091\",\"0xb3ab459503754d7ffbceb026c9a12971f082734e588c5e09df0875237fd918a2\"],\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"logIndexRaw\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000080000010000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000800\",\"revertReason\":null,\"type\":\"0x0\",\"effectiveGasPrice\":null,\"statusOK\":true,\"gasUsedRaw\":\"0x6ebc\",\"transactionIndexRaw\":\"0x0\",\"blockNumberRaw\":\"0x2\",\"cumulativeGasUsedRaw\":\"0x6ebc\"}"
},
"events" : [ {
"signature" : "ExampleEvent(tuple(address),tuple(address))",
"arguments" : [ {
"name" : "nonIndexedStruct",
"type" : "VALUE",
"value" : [ "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1" ],
"hash" : null
}, {
"name" : "indexedStruct",
"type" : "HASH",
"value" : null,
"hash" : "0xb3ab459503754d7ffbceb026c9a12971f082734e588c5e09df0875237fd918a2"
} ]
} ]
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"FunctionArgumentSchema" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string"
},
"value" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
}
},
"FunctionArgumentTypes" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "boolean"
}, {
"type" : "number"
}, {
"type" : "array",
"items" : {
"anyOf" : [ {
"type" : "string"
}, {
"type" : "number"
} ]
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
}, {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentTypes"
}
} ]
}
},
"type" : "object",
"properties" : {
"requests" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"arbitrary_call_tx" : {
"type" : "object",
"properties" : {
"block_confirmations" : {
"type" : [ "string", "null" ],
"pattern" : "^[+-]?[0-9]+$"
},
"data" : {
"type" : [ "string", "null" ]
},
"from" : {
"type" : [ "string", "null" ]
},
"raw_rpc_transaction_receipt" : {
"type" : [ "string", "null" ]
},
"timestamp" : {
"type" : [ "string", "null" ],
"format" : "date-time"
},
"to" : {
"type" : "string"
},
"tx_hash" : {
"type" : [ "string", "null" ]
},
"value" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
},
"arbitrary_data" : {
"type" : [ "object", "null" ]
},
"caller_address" : {
"type" : [ "string", "null" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"contract_address" : {
"type" : "string"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deployed_contract_id" : {
"type" : [ "string", "null" ],
"format" : "uuid"
},
"eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"events" : {
"type" : [ "array", "null" ],
"items" : {
"type" : "object",
"properties" : {
"arguments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"hash" : {
"type" : [ "string", "null" ]
},
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "VALUE", "HASH" ]
},
"value" : { }
}
}
},
"signature" : {
"type" : [ "string", "null" ]
}
}
}
},
"function_call_data" : {
"type" : "string"
},
"function_name" : {
"type" : [ "string", "null" ]
},
"function_params" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/FunctionArgumentSchema"
}
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"project_id" : {
"type" : "string",
"format" : "uuid"
},
"redirect_url" : {
"type" : "string"
},
"screen_config" : {
"type" : [ "object", "null" ],
"properties" : {
"after_action_message" : {
"type" : [ "string", "null" ]
},
"before_action_message" : {
"type" : [ "string", "null" ]
}
}
},
"status" : {
"type" : "string",
"enum" : [ "PENDING", "SUCCESS", "FAILED" ]
}
}
}
}
}
}
12.4. Attach Transaction Info to Contract Arbitrary Call Request
Attaches transaction hash and caller wallet address to existing contract arbitrary call request. Once the transaction hash is attached to the request, any subsequent attempts to attach a new transaction hash will fail.
Request Example
PUT /v1/arbitrary-call/a429158e-bcd9-4d15-a329-5467c0d45feb HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080
{
"tx_hash" : "0x1",
"caller_address" : "0x000000000000000000000000000000000000000c"
}
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"caller_address" : {
"type" : "string"
},
"tx_hash" : {
"type" : "string"
}
}
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 6c1664eb-65cb-44ef-841c-b7a1229a52fb
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
13. Public Address Book API
All endpoints are public and do not require Authorization: Bearer JWT
header. Endpoints to modify address book entries
can be found in the internal API documentation.
13.1. Fetch Address Book Entry by ID
Fetches stored address book entry by ID.
Request Example
GET /v1/address-book/75f003be-0fc5-4c01-a136-ffab1b6dc755 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 2765d82f-4678-40ea-86aa-d09851d47612
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 229
{
"id" : "75f003be-0fc5-4c01-a136-ffab1b6dc755",
"alias" : "alias",
"address" : "0x0000000000000000000000000000000000000abc",
"phone_number" : "phone-number",
"email" : "email",
"created_at" : "2022-02-02T00:00:00Z"
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"address" : {
"type" : "string"
},
"alias" : {
"type" : "string"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"email" : {
"type" : [ "string", "null" ]
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"phone_number" : {
"type" : [ "string", "null" ]
}
}
}
13.2. Fetch Address Book Entries
Fetches stored address book entries for the specified wallet address.
Request Example
GET /v1/address-book/by-wallet-address/0x0000000000000000000000000000000000abc123 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: fe24e97c-97bb-4ce5-8121-2e3d43c4f1e2
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 265
{
"entries" : [ {
"id" : "14db4301-5b1d-4d24-8f7e-297c00332145",
"alias" : "alias",
"address" : "0x0000000000000000000000000000000000000abc",
"phone_number" : "phone-number",
"email" : "email",
"created_at" : "2022-02-02T00:00:00Z"
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"entries" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"address" : {
"type" : "string"
},
"alias" : {
"type" : "string"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"email" : {
"type" : [ "string", "null" ]
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"phone_number" : {
"type" : [ "string", "null" ]
}
}
}
}
}
}
14. Public Multi-Payment Template API
All endpoints are public and do not require Authorization: Bearer JWT
header. Endpoints to modify multi-payment
templates can be found in the internal API documentation.
14.1. Fetch Multi-Payment Template
Fetches stored multi-payment template by ID.
Request Example
GET /v1/multi-payment-template/d53b5cc7-a6c2-49d3-b2ec-f807d0d64b7b HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: afe28ad4-e3d8-4808-aa45-22df446a94f3
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 561
{
"id" : "d53b5cc7-a6c2-49d3-b2ec-f807d0d64b7b",
"items" : [ {
"id" : "cd53dc3f-2a72-4436-a25b-b466e9bec64a",
"template_id" : "d53b5cc7-a6c2-49d3-b2ec-f807d0d64b7b",
"wallet_address" : "0x000000000000000000000000000000000000000a",
"item_name" : "itemName",
"amount" : "10",
"created_at" : "2022-02-02T00:00:00Z"
} ],
"template_name" : "templateName",
"asset_type" : "TOKEN",
"token_address" : "0x000000000000000000000000000000000000000b",
"chain_id" : 31337,
"created_at" : "2022-02-02T00:00:00Z",
"updated_at" : null
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"items" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"item_name" : {
"type" : [ "string", "null" ]
},
"template_id" : {
"type" : "string",
"format" : "uuid"
},
"wallet_address" : {
"type" : "string"
}
}
}
},
"template_name" : {
"type" : "string"
},
"token_address" : {
"type" : [ "string", "null" ]
},
"updated_at" : {
"type" : [ "string", "null" ],
"format" : "date-time"
}
}
}
14.2. Fetch Multi-Payment Templates
Fetches stored multi-payment templates for the specified wallet address.
Request Example
GET /v1/multi-payment-template/by-wallet-address/abc123 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 25529928-5b8c-4b7d-b027-88a7d4ad99b1
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 305
{
"templates" : [ {
"id" : "761bb835-d962-4369-b7fb-e55a48c8fb65",
"template_name" : "templateName",
"asset_type" : "TOKEN",
"token_address" : "0x000000000000000000000000000000000000000b",
"chain_id" : 31337,
"created_at" : "2022-02-02T00:00:00Z",
"updated_at" : null
} ]
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"templates" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"asset_type" : {
"type" : "string",
"enum" : [ "NATIVE", "TOKEN" ]
},
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"id" : {
"type" : "string",
"format" : "uuid"
},
"template_name" : {
"type" : "string"
},
"token_address" : {
"type" : [ "string", "null" ]
},
"updated_at" : {
"type" : [ "string", "null" ],
"format" : "date-time"
}
}
}
}
}
}
15. Gas Price and Cost API
All endpoints are public and do not require Authorization: Bearer JWT
header.
15.1. Get Current Gas Price
Fetches current gas price for the project’s chain.
Request Example
GET /v1/gas/price HTTP/1.1
X-API-KEY: api-key
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 48d465e5-2e86-48d4-a4fb-01668febe73e
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 54
{
"chain_id" : 31337,
"gas_price" : "8000000000"
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"gas_price" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
}
15.2. Estimate Gas Cost of Contract Arbitrary Call Request
Estimates gas cost of contract arbitrary call request with specified parameters. Parameter caller_address
is optional.
Target contract can be specified by providing deployed_contract_id
, deployed_contract_alias
or contract_address
in
the request body. Exactly one of the mentioned values must be provided, otherwise the request will be considered
invalid. The deployed_contract_id
and deployed_contract_alias
correspond to ID or alias of the contract which was
deployed using the Contract Deployment Request API. If contract_address
is used to specify target contract, then
deployed_contract_id
will have null
value in the response.
This request requires an API key present in the X-API-KEY
header.
Request Example (via deployed_contract_id
)
POST /v1/gas/estimate/arbitrary-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 256
Host: localhost:8080
{
"deployed_contract_id" : "00028f40-6d0f-43dc-8823-ba705c1f851b",
"function_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
"eth_amount" : "0",
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via deployed_contract_alias
)
POST /v1/gas/estimate/arbitrary-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 237
Host: localhost:8080
{
"deployed_contract_alias" : "contract-alias",
"function_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
"eth_amount" : "0",
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via contract_address
)
POST /v1/gas/estimate/arbitrary-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 258
Host: localhost:8080
{
"contract_address" : "0x00000000000000000000000000000000cafebabe",
"function_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
"eth_amount" : "0",
"caller_address" : "0x000000000000000000000000000000000000000b"
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: b7201911-0543-48e9-a86a-c5e1069499b8
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 52
{
"chain_id" : 31337,
"gas_estimate" : "21205"
}
Schemas:
Request Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"caller_address" : {
"type" : [ "string", "null" ]
},
"contract_address" : {
"type" : [ "string", "null" ]
},
"deployed_contract_alias" : {
"type" : [ "string", "null" ]
},
"deployed_contract_id" : {
"type" : [ "string", "null" ],
"format" : "uuid"
},
"eth_amount" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
},
"function_data" : {
"type" : "string"
}
}
}
Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"chain_id" : {
"type" : "integer",
"format" : "int64"
},
"gas_estimate" : {
"type" : "string",
"pattern" : "^[+-]?[0-9]+$"
}
}
}
16. Available Function Argument Types
Below table contains the list of all supported function argument types. Any type can be made into an array by appending
square brackets to the end of the type ([]
). Fixed-size arrays are also supported by inserting a number inside the
square brackets to indicate the array size (e.g. string[1]
is an array of exactly one string
element).
Multi-dimensional arrays can be made by appending multiple square brackets. All array elements must be of the same type
- this means that all tuple
arrays must have tuple
elements with matching field element types in the correct
order.
Array Examples
Array type | JSON value example |
---|---|
|
|
|
|
|
|
Type name | JSON value type | Example value | Description |
---|---|---|---|
|
|
|
Array of objects which must contain |
|
|
|
Wallet or contract address in hex format, with optional |
|
|
|
Boolean value, |
|
|
|
Arbitrary string value. |
|
|
|
Array of bytes of variable size. Elements can be either numbers or string representations of numbers in base 10. |
|
|
|
Byte value. Can be either a number or a string representation of the number in base 10. |
|
|
|
256-bit unsigned integer (alias for |
|
|
|
Unsigned integer with specified bit precision. Can be either a number or a string representation of the number in base 10. |
|
|
|
256-bit signed integer (alias for |
|
|
|
Signed integer with specified bit precision. Can be either a number or a string representation of the number in base 10. |
|
|
|
Fixed-size byte array. The size of the provided array must match the specified type size. Elements can be either numbers or string representations of numbers in base 10. |
17. Error Response
All endpoints can return an error response. This section contains an example error response, error response schema and a table of all possible error codes.
Error Response Example
HTTP/1.1 401 UNAUTHORIZED
Content-Type: application/json
{
"error_code" : "BAD_AUTHENTICATION",
"message" : "Provided authentication header has invalid format"
}
Error Response Schema
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"error_code" : {
"type" : "string",
"enum" : [ "RESOURCE_NOT_FOUND", "UNSUPPORTED_CHAIN_ID", "TEMPORARY_BLOCKCHAIN_READ_ERROR", "BLOCKCHAIN_READ_ERROR", "BLOCKCHAIN_EVENT_READ_ERROR", "TX_INFO_ALREADY_SET", "SIGNED_MESSAGE_ALREADY_SET", "ACCESS_FORBIDDEN", "BAD_AUTHENTICATION", "API_KEY_ALREADY_EXISTS", "NON_EXISTENT_API_KEY", "API_RATE_LIMIT_EXCEEDED", "MISSING_TOKEN_ADDRESS", "TOKEN_ADDRESS_NOT_ALLOWED", "DUPLICATE_ISSUER_CONTRACT_ADDRESS_FOR_CHAIN_ID", "ALIAS_ALREADY_IN_USE", "CONTRACT_NOT_DEPLOYED", "INVALID_REQUEST_BODY", "INVALID_QUERY_PARAM", "CONTRACT_NOT_FOUND", "CONTRACT_BINARY_MISMATCH", "CANNOT_DECOMPILE_CONTRACT_BINARY", "CONTRACT_DECOMPILATION_TEMPORARILY_UNAVAILABLE", "CONTRACT_DECORATOR_INCOMPATIBLE", "CONTRACT_INTERFACE_NOT_FOUND", "IPFS_UPLOAD_FAILED", "ABI_DECODING_FAILED", "CUSTOMER_ALREADY_EXISTS", "CUSTOMER_CREATION_FAILED", "CUSTOMER_NOT_YET_CREATED", "SUBSCRIPTION_ALREADY_ACTIVE", "PROMO_CODE_EXPIRED", "PROMO_CODE_ALREADY_USED" ]
},
"message" : {
"type" : "string"
}
}
}
Error Codes
Error Code | Description |
---|---|
|
Indicates that the requested resource cannot be found |
|
The chain ID specified in the project is not directly supported and requires a custom RPC URL |
|
Data cannot be temporarily read from blockchain, the same request should be retried at a later time |
|
Requested data cannot be retrieved from the blockchain because it is not well formed (i.e. non-existent contract address, calling non-existent contract function etc.) |
|
Requested event data cannot be retrieved from the blockchain because it is not well formed (i.e. non-existent contract address, calling non-existent contract function etc.) |
|
The transaction info has already been set for the requested resource and it cannot be overridden |
|
The signed message has already been set for the requested resource and it cannot be overridden |
|
Access to the provided resource is not allowed for the current user |
|
Provided authentication token has invalid format |
|
The project already has an API key generated and no more keys can be generated for that project |
|
The provided API key does not exist and is therefore invalid |
|
API rate limit has been exceeded for the project |
|
The request body is missing |
|
The request body must not have non-null |
|
A project with given issuer contract address already exists for the specified chain ID |
|
The provided alias is already in use for the specified resource type for the project associated with provided API key |
|
The contract has not yet been deployed on the blockchain, and therefore has no contract address defined - the request should be retried at a later time |
|
Indicates that one or more fields in the request body has an invalid value |
|
Indicates that one or more query parameters have invalid value |
|
No smart contract can be found for given contract address |
|
Indicates that the imported contract binary does not match binary of requested contract ID |
|
Binary of the requested contract cannot be successfully decompiled |
|
Decompilation of contract binary is currently unavailable and should be tried at a later time |
|
Contract decorator is incompatible with contract ABI specification |
|
Indicates that the requested contract interface cannot be found |
|
Indicates that file upload to IPFS has failed |
|
Indicates that error occurred while decoding ABI-encoded response. This is most likely caused by incompatible ABI types (e.g. decoding an int as a string) |
|
Indicates that customer has already been created for the authenticated wallet |
|
Indicates that customer has failed created due to an error |
|
Indicates that customer has not been created yet for the authenticated wallet |
|
Indicates that customer has an already active subscription |
|
Indicates that the requested promo code has expired |
|
Indicates that the user has already used the requested promo code before |