Skip to main content

/v2/contracts/interface/{contract_address}/{contract_name} REST API Endpoint

Retrieves a contract interface with a given `contract_address` and `contract name`.

Updated on
Oct 4, 2023

/v2/contracts/interface/{contract_address}/{contract_name} REST API Endpoint

Path Parameters

contract_address
string
REQUIRED
Stacks address.
contract_name
string
REQUIRED
Contract name.

Query Parameters

tip
string
The Stacks chain tip to query from.

Returns

object
GET request to retrieve the interface of a contract
functions
array
List of defined methods in the contract interface
name
string
The name of the method
access
string
The access level of the method (e.g., 'public', 'private')
args
array
Array containing details of the method's arguments
name
string
The name of the argument
type
string
The data type of the argument
response
object
The response object containing details of the method's return value
variables
array
List of defined variables in the response object
name
string
The name of the variable
type
string
The data type of the variable
access
string
The access level of the variable (e.g., 'public', 'private')
maps
array
List of defined data-maps in the response object
name
string
The name of the data-map
key
string
The key type of the data-map
value
object
The value object containing details of the data-map's value
tuple
array
Array containing details of the data-map's tuple
name
string
The name of the tuple
type
string
The data type of the tuple
fungible_tokens
array
List of fungible tokens defined in the response object
name
string
The name of the fungible token
type
string
The data type of the fungible token
non_fungible_tokens
array
List of non-fungible tokens defined in the response object
name
string
The name of the non-fungible token
type
string
The data type of the non-fungible token
Request
1
curl -X 'GET' \
2
'https://docs-demo.stacks-mainnet.quiknode.pro/v2/contracts/interface/SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9/.swap-helper-v1-01' \
3
-H 'Content-Type: application/json'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free