Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ttytm/anchor-solana-twitter
Web3 application on the Solana blockchain written in Rust (Anchor). A Twitter like, decentralized communication platform.
https://github.com/ttytm/anchor-solana-twitter
anchor blockchain dapp solana web3
Last synced: 3 months ago
JSON representation
Web3 application on the Solana blockchain written in Rust (Anchor). A Twitter like, decentralized communication platform.
- Host: GitHub
- URL: https://github.com/ttytm/anchor-solana-twitter
- Owner: ttytm
- License: mit
- Created: 2022-04-20T18:48:51.000Z (over 2 years ago)
- Default Branch: v2
- Last Pushed: 2022-12-24T14:37:41.000Z (about 2 years ago)
- Last Synced: 2023-07-27T14:24:13.343Z (over 1 year ago)
- Topics: anchor, blockchain, dapp, solana, web3
- Language: TypeScript
- Homepage: https://twitter-with-ass.vercel.app/
- Size: 357 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# anchor-solana-twitter
Extends and refactors the [v1-branch][10].
Changes
- Votings are their own accounts using PDAs, instead of just updating a counter on an existing tweet
- enables to filter votings for a user
- less costs for sending a vote
- the `rating` counter on tweets becomes obsolete, which results in slimmer tweet accounts- Direct messages are separate accounts instead of being a tweet
- less cost on for dms
- `recipient` on tweet account becomes obsolete- Comment functionality
- Users can create aliases
- New api syntax for tests
- abandon deprecated `.rpc` in favor of `.methods` syntax
## Running
The installation of the prerequisites to run an anchor program is nicely explained in the [anchor book][20].
With the prerequisites out of the way, `npm i` installs the rest of the dependencies.
Then building and running the tests can be done with `anchor test`.
To use the tests while working on a frontend run the localnet with `anchor localnet`.
In another terminal airdrop your wallet some SOL and load the test `solana airdrop 1000 && anchor run test`.### Tested Functionalities
```
❯ anchor testtweets
✔ can send and update tweets
✔ can send a tweet without a tag
✔ cannot send a tweet without content
✔ cannot send a tweet with a tag > 50 or content > 280 characters
✔ cannot update a tweet without changes
✔ can delete own tweets
✔ can fetch and filter tweetscomments
✔ can comment and update comments
✔ can delete commentsvotings
✔ can vote and update votings
✔ can derive tweets from votingsdirect messages
✔ can send and update dms
✔ can delete dms
✔ can fetch and filter dmsuser alias
✔ can create and update a user alias
✔ can delete a user aliasstatus
✔ can set a status message with up to 50 characters
✔ can delete a status messagereactions
✔ can react on tweets and update and delete reactions
✔ cannot send other then predefined reactions
```## Frontend Showcase
To showcase the functionalities of this app you can check out a frontend implementation using SvelteKit on https://twitter-with-ass.vercel.app/ - _WIP_
[10]: https://github.com/tobealive/anchor-solana-twitter/tree/v1
[20]: https://book.anchor-lang.com/getting_started/installation.html