Smart Contracts
Smart contracts are electronic agreements stored on distributed computers called blockchains. Use the smart contracts API to get details about contracts on the network.
Show contract details
POST
/v1
Shows the details of a given smart contract on the network.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
contract_id
string
The ID of the contract within the Formless Network.
Response
A contract_address
is the location of a smart contract program on a given blockchain. It is similar to a memory address on a single computer, but in this case it is the address within the context of a distributed system. Each blockchain has a globally unique ID called a network_id.
Ethereum
Layer 1 Ethereum blockchain.
Optimism
Layer 2 Ethereum blockchain with faster, cheaper transactions.
Polygon Proof-of-Stake
Ethereum side chain with faster, cheaper transactions.
Create a smart contract
POST
/v1
Creates a smart contract on the network.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
type
string
The type of smart contract to create. Only digital_property_with_revenue_share
is supported.
network
string
The name of the blockchain. optimism
and polygon
are supported.
title
string
The title of the digital property, e.g. the track or video name.
description
string
The description of the digital property.
creator_name
string
The name of the creator of the digital property.
revenue_source
dictionary
A dictionary used to specify details for the revenue source connected to the contract.
revenue_share
dictionary
A dictionary used to specify details for the revenue share splits associated with the contract.
Response
Update smart contract metadata
POST
/v1
Updates metadata associated with a smart contract.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
contract_id
string
The ID of the contract within the Formless Network.
metadata
dictionary
A dictionary containing the metadata fields to update. This dictionary will be merged into any existing metadata and will overwrite any specified attributes.
Response
Last updated