BackedBy Documentation
  • OVERVIEW
    • What Is BackedBy
  • DEVELOPERS
    • Smart Contracts
      • Core
        • BBProfiles
        • BBPosts
        • BBTiers
        • BBPermissionsV01
      • Subscriptions
        • BBSubscriptions
        • BBSubscriptionsFactory
      • Gas Oracle
      • BBERC20 Wrapper
    • Integration Guide
      • JSON Schemas
    • Example Contracts
      • Access Control
      • Single Tx Profile Setup
  • RESOURCES
    • Github
    • Contact Us
Powered by GitBook
On this page
  • Functions
  • createPost
  • editPost
  • getPost
  • profilesTotalPosts
  1. DEVELOPERS
  2. Smart Contracts
  3. Core

BBPosts

PreviousBBProfilesNextBBTiers

Last updated 2 years ago

Functions

createPost

function createPost(
    uint256 profileId, 
    string calldata cid
) external returns (uint256 postId)

Creates a post and sets its CID

Parameters

Name
Type
Description

profileId

uint256

ID of the profile to create the post in

cid

string

CID of the created post

Return Values

Name
Type
Description

postId

uint256

ID of the created post

editPost

function editPost(
    uint256 profileId, 
    uint256 postId, 
    string calldata cid
) external

Sets an existing posts CID

Parameters

Name
Type
Description

profileId

uint256

ID of the profile to edit the post in

postId

uint256

ID of the post to edit

cid

string

New CID of the post

getPost

function getPost(
    uint256 profileId, 
    uint256 postId
) external view returns (string memory cid)

Returns an existing posts CID

Parameters

Name
Type
Description

profileId

uint256

ID of the profile that owns the post

postId

uint256

ID of the post to return

Return Values

Name
Type
Description

cid

string

Returned posts CID

profilesTotalPosts

function profilesTotalPosts(
    uint256 profileId
) external view returns (uint256 total)

Returns the number of total posts from a profile

Parameters

Name
Type
Description

profileId

uint256

ID of the profile to return the number of total posts

Return Values

Name
Type
Description

total

uint256

Number of total posts

v1-contracts/BBPosts.sol at main · backedby/v1-contractsGitHub
Logo