Giter Site home page Giter Site logo

anon's Introduction

ANON Contract

ANON is a Solidity contract that enables anonymous posting and voting on content. Users can create posts anonymously, upvote and downvote posts, and posts are automatically deleted after 24 hours based on the voting results.

Features

  • Create posts anonymously with content and timestamp
  • Upvote and downvote posts
  • Automatic deletion of posts after 24 hours based on voting results
  • Automatic post removal based on downvotes.
  • Minting of CSE tokens for posts with a certain threshold of upvotes.
  • Blacklisting and whitelisting of addresses.

Getting Started

Prerequisites

  • Solidity development environment
  • Ethereum network or a local blockchain for deployment and testing

Deployment

  1. Clone the repository:

    git clone https://github.com/your-username/ANON-contract.git
  2. Compile the contract using a Solidity compiler of your choice.

  3. Deploy the contract to an Ethereum network or a local blockchain.

  4. Interact with the contract using a web interface or through a Solidity development environment.

Usage

The contract provides the following functions:

post(string calldata _post, string calldata _time): Create a new post anonymously with the given content and timestamp.

viewAllpost(): Retrieve an array of all posts.

upVote(uint256 _id): Upvote a post specified by its ID.

downVote(uint256 _id): Downvote a post specified by its ID.

removePost(): Removes a post if it has received more downvotes than upvotes within 24 hours. The removal is based on the voting results and is performed automatically.

The posts are automatically deleted after 24 hours based on the voting results. If a post receives a higher number of downvotes than upvotes within this timeframe, it will be removed from the contract.

Contributing

Contributions to ANON Contract are welcome! If you encounter any bugs, issues, or have suggestions for improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

anon's People

Contributors

roudra323 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.