Socket
Socket
Sign inDemoInstall

@espresso-org/aragon-comments

Package Overview
Dependencies
5
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @espresso-org/aragon-comments

Add comments to any Aragon app


Version published
Weekly downloads
8
Maintainers
2
Created
Weekly downloads
 

Readme

Source

Aragon Comments

Aragon Comments offers an easy way for developers to integrate discussion threads to their Aragon app.

Install

npm install --save @espresso-org/aragon-comments

Usage

  1. Import and inherit the HasComments solidity smart contract.
import "@espresso-org/aragon-comments/contracts/HasComments.sol";

contract MyApp is HasComments, AragonApp {
    ...
}
  1. Add the postComment function to your smart contract. This function lets you write custom validation logic on the author and message content before posting a comment to a discussion thread.
contract MyApp is HasComments, AragonApp {

    function postComment(string comment, string threadName) public {
        aragonComments.postComment(comment, msg.sender, threadName);
    }  

}
  1. Import and add the CommentThread react component to your javascript frontend.
import { CommentThread } from '@espresso-org/aragon-comments'

class App extends React.Component {
  render () {
    return (
      <div>
      ...
        <CommentThread 
            aragonApp={this.props.app} 
            thread="my-comment-thread" 
        />
      </div>
    )
  }
}
  1. Make sure to install the Aragon Comments app to your DAO.
aragon dao install <dao address> aragon-comments

FAQs

Last updated on 22 Jan 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc