grkmyvz / scroffiti

Smart contract and web app for Scroll Chain

Home Page:https://scroffiti.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scroffiti

Scroffiti is an intelligent contract built with the Foundry library to deploy on the Scroll network. This repository contains the smart contract, its tests, and a deployment script. Additionally, there is a user interface prepared for this contract that presents the information from the deployed contract on a web page.

What is Scroffiti?

Scroffiti is a term coined by combining "scroll" and "graffiti." It is not a specific entity but simply the name given to each 32-character text shared with this contract on the Scroll network.

Contract Details

The contract has a simple structure that keeps a list of all scroffitis sent to the contract. It also maintains the one with the highest score among these scroffitis, as well as the scores of all other scroffitis. There are several functions available for interaction with this contract. Two of these functions are "write" and "moveUp." The "write" function writes a new scroffiti to the contract, while the "moveUp" function gives one point to the scroffiti at the specified index. The "moveUp" function charges a 0.001 ETH fee from the entity executing the function. The purpose of this fee is not to make money from this contract but to ensure that people give points only to the scroffiti they genuinely like.

User Interface Components

The interface consists of five components:

  1. Wallet connection component
  2. Component displaying the scroffiti with the highest score
  3. Component that allows you to send scroffiti to the contract
  4. Component for reading by index ID
  5. Component listing the most recently sent scroffitis

The complete code for the contract and the application interface can be found in this GitHub repository.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

This project is licensed under the MIT License

About

Smart contract and web app for Scroll Chain

https://scroffiti.vercel.app


Languages

Language:Solidity 97.2%Language:TypeScript 2.5%Language:CSS 0.3%Language:Makefile 0.0%Language:JavaScript 0.0%Language:Nix 0.0%