Comments Protocol Contract
The contracts are currently only deployed on the Base Sepolia as we decide where to deploy the production contracts.
Network | Contract Address | Contract |
---|---|---|
Base Mainnet | 0xb262C9278fBcac384Ef59Fc49E24d800152E19b1 | Base Mainnet |
Base Sepolia | 0xb262C9278fBcac384Ef59Fc49E24d800152E19b1 | Base Sepolia |
Importing ABIs
You can import the contract ABIs directly from the SDK:
import { CommentManagerABI, ChannelManagerABI } from "@ecp.eth/sdk/abis";
- Contract ABI Reference: View ABI Documentation | GitHub Source
Comment Manager Contract Functions
Function | Description | Note |
---|---|---|
postComment | Post a comment with app signature verification | Requires author to be msg.sender |
postCommentWithSig | Post a comment with both author and app signatures | Allows posting on behalf of author with signatures |
editComment | Edit a comment with app signature verification | Requires author to be msg.sender |
editCommentWithSig | Edit a comment with both author and app signatures | Allows editing on behalf of author with signatures |
deleteComment | Delete a comment when called by the author | ⚠️ Deleted data may still be traceable or recoverable onchain |
deleteCommentWithSig | Delete a comment with signature verification | ⚠️ Deleted data may still be traceable or recoverable onchain |
addApproval | Approve an app signer directly | Called by the author |
addApprovalWithSig | Approve an app signer with signature | Allows approving on behalf of author with signature |
revokeApproval | Remove an app signer approval directly | Called by the author |
removeApprovalWithSig | Remove an app signer approval with signature | Allows revoking on behalf of author with signature |
getComment | Get a comment by ID | |
getCommentMetadataKeys | Get the metadata keys for a comment | |
getCommentMetadataValue | Get the metadata value for a comment | |
... | ... | ... |
For detailed information about all functions, events, and structs, please refer to the Contract ABI Documentation.
Channel Manager Contract Details
- Contract ABI: View ABI Documentation | GitHub Source
Network | Contract Address | Contract |
---|---|---|
Base Mainnet | 0xa1043eDBE1b0Ffe6C12a2b8ed5AfD7AcB2DEA396 | Base Mainnet |
Base Sepolia | 0xa1043eDBE1b0Ffe6C12a2b8ed5AfD7AcB2DEA396 | Base Sepolia |
ChannelManager Contract Functions
Function | Description | Note |
---|---|---|
createChannel | Creates a new channel with specified name, description, metadata, and optional hook | Requires channel creation fee |
updateChannel | Updates an existing channel's name, description, and metadata | Only callable by channel owner |
setHook | Sets or updates a hook contract for a channel | Only callable by channel owner |
getChannel | Retrieves channel information including name, description, metadata, and hook address | |
channelExists | Checks if a channel ID exists | |
setBaseURI | Sets the base URI for token metadata | Only callable by contract owner |
ownerOf | Gets the owner address of a channel |
For detailed information about all functions, events, and structs, please refer to the Contract ABI Documentation.