Skip to content

Commit

Permalink
Modified Markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
luloxi committed Oct 19, 2024
1 parent a2161fa commit cca9760
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 33 deletions.
8 changes: 5 additions & 3 deletions AVALANCHE-L1.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ It'll take some time to load, go take a walk or something

5. After it boots up the blockchain, for some reason port `9650` doesn't set itself automatically to public, so you gotta click `Ports` to the right of `Terminal`, find port 9650, right click it, Port visibility, Public

> NOTE: After 30 minutes (or if you close the tab/browser) your codespaces goes to sleep. To restart your blockchain after your codespace was sleep, run `avalanche network start`
> NOTE: After 30 minutes (or if you close the tab/browser) your codespaces goes to sleep. To restart your blockchain after your codespace was sleep, run `avalanche network start`. Remember to set **Port 9650** to public again.
> NOTE 2: To keep alive the codespace, you can run `while true; do echo "I'm alive!" > /dev/null; sleep 900; done &` on the terminal. It'll print `I'm alive!` every 15 minutes, keeping the codespace alive.
> NOTE for Ava Labs: Maybe a **function to set Port 9650 to public** could be a temporary improvement to open it until it's opened automatically by default.
> NOTE for Ava Labs: Codespace could be kept alive automatically on codespaces [with a cronjob](./avalanche_codespace_keepalive.md).
> NOTE for Ava Labs: Codespace should be kept alive automatically on codespaces [with a cronjob (maybe not this one)](./avalanche_codespace_keepalive.md).
> NOTE for Ava Labs: When running `avalanche network start` after the codespace was asleep, my dapp can't connect with the same RPC URL to the blockchain anymore, and I have to start a new chain. Maybe it's a problem with the codespace or my computer, I'm not sure. Had to reinstall [Linux Mint Cinnamon Edition](https://linuxmint.com/download.php) a few days ago, maybe I'm missing some dependency or something, or it's a problem with my local/internet network.
## 2. Load RPC URL into your scaffold-eth

Expand Down
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Social dapp where interactions are monetized 💰 allowing users to earn through engaging with their community 🫂.
Social protocol where interactions are monetized 💰 allowing users to earn through engaging with their community 🫂.

# 🤘 Features

> NOTE: This is a work in progress and most features are not yet implemented.
- ⛓️ **Avalanche L1 with USDC as native gas**
- 💸 **When bridged to PunkSociety, USDC earns interest on AAVE**
- 💸 **When bridged to PunkSociety, you can select different options to stake your USDC or bridged asset**
- ⛓️ **Avalanche L1 with USDC as native gas** and other tokens bridged from other chains.
- 💰 **Social monetization**: Likes, comments, shares and follows send USDC to the user on the other end
- 📈 **Revenue dashboard**: Users can track and analyze their earnings

- 🤹‍♂️ **Post types**: Posts can have text, image, audio, video, links and polls
- 🔔 **Notifications**: Receive alerts on activity
- 💌 **Messaging**: Direct messaging and group chat features
- 🎨 **Profile customization**: Users can customize their profile and post collections
- 🎨 **Profile customization**: Users can customize their profile and create post collections

- 📱 **Web 2.5 login**: Social login options with Web2 platforms (Google, Twitter, etc.)
- 🌐 **Multi-chain support**: Bridge your posts as NFTs to Avalanche L0 and other chains to access NFT markets
Expand All @@ -33,17 +33,19 @@ Social dapp where interactions are monetized 💰 allowing users to earn through
-**Search**: By address or username
- ✅ Enable options for sharing on other platforms
-**Avalanche L1 with USDC as native gas:** Use an Avalanche L1 with USDC as native gas (Reference: [Create an Avalanche L1](https://docs.avax.network/tooling/create-deploy-avalanche-l1s/create-avalanche-l1))
- Enable following users, liking, commenting and sharing posts on frontend
- **Individual post viewer**
- Enable liking with incentive

## 📈 Phase 2 (Business model)

- **Incentive model**: Social interactions send $ to the user on the other end
- **USDC Staking/Lending model**: Bridged USDC can be lent or staked on AAVE and/or Compound (or similar) so users can earn interest on their USDC while using the platform
- **Business Model**: PunkSociety collects 1% fees from social interactions and from USDC lending revenue
- **Easy onramp tool**: Easy USDC buying tool for onboarding new users. (Reference:[FundButton from Coinbase](https://onchainkit.xyz/fund/fund-button) | [OnchainKit extension for Scaffold-ETH 2](https://github.com/scaffold-eth/create-eth-extensions/tree/onchainkit))
- **Built-in bridge manager**: Built-in simple tool for bridging USDC and NFTs to and from Avalanche, Base, Ethereum, and other EVM chains (Reference: [avalanche-interchain-token-transfer](https://github.com/ava-labs/avalanche-interchain-token-transfer) | [Chainlink CCIP Cross Chain Tokens](https://docs.chain.link/ccip/tutorials/cross-chain-tokens))
- **Staking**: Bridged USDC goes to lending on AAVE so users can earn interest on their USDC while using the platform
- Make PunkSociety the only one who can deploy contracts on the chain (Reference: [Avalanche Contract Deployer Allowlist](https://academy.avax.network/course/multi-chain-architecture/06-permissioning-users/06-contract-deployer-allowlist))
- **Dashboard Insights**: Track and analyze your revenue
- **Easy onramp tool**: Easy USDC buying tool for onboarding new users. (Reference:[FundButton from Coinbase](https://onchainkit.xyz/fund/fund-button) | [OnchainKit extension for Scaffold-ETH 2](https://github.com/scaffold-eth/create-eth-extensions/tree/onchainkit))
- **Business Model**: PunkSociety collects 1% fees from social interactions and from USDC lending revenue
- Enable following users, liking, commenting and sharing posts on frontend
- **Individual post viewer**

## 🌐 Phase 3 (Indexing)

Expand Down Expand Up @@ -74,9 +76,13 @@ Social dapp where interactions are monetized 💰 allowing users to earn through

## 🛠️ Technical details

⚙️ Built using Foundry, NextJS, RainbowKit, Wagmi, Viem, and Typescript,
⚙️ Currently built using [Scaffold-ETH 2](https://scaffoldeth.io/), [Foundry](https://book.getfoundry.sh/), [OnchainKit](https://onchainkit.xyz/), [Pinata](https://pinata.cloud/), [Vercel](https://vercel.com/), [NextJS](https://nextjs.org/), [RainbowKit](https://rainbowkit.com/), [Wagmi](https://wagmi.sh/), [Viem](https://viem.sh/), and [Typescript](https://www.typescriptlang.org/).

🏦 Considering using protocols: [The Graph](https://thegraph.com/) for indexing events, [Uniswap](https://app.uniswap.org/) and similar with an aggregator for token swaps, [AAVE](https://aave.com/), [Compound](https://compound.finance/) and similar options for generating interest on bridged [ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/), [Chainlink](https://chain.link/) for price oracles, [Push Protocol](https://push.org/) for notifications and messages.

📜 Considering using contracts: [Ownable](https://docs.openzeppelin.com/contracts/2.x/access-control) and [Upgradeable](https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable) from [OpenZeppelin](https://www.openzeppelin.com/) or [Solady](https://github.com/Vectorized/solady) for contract ownership. [EIP712 Signatures](https://eips.ethereum.org/EIPS/eip-712).

🔗 To be deployed on EVM compatible chains
🔗 To be deployed on [Avalanche L1](https://github.com/ava-labs/avalanche-starter-kit) and Bridge [ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) and [ERC721](https://ethereum.org/en/developers/docs/standards/tokens/erc-721/) using [Avalanche Interchain Token Transfer](https://github.com/ava-labs/avalanche-interchain-token-transfer) and [Chainlink CCIP Transfer Tokens](https://docs.chain.link/ccip/tutorials/cross-chain-tokens) with [EVM compatible chains](https://ethereum.org/en/developers/docs/scaling/sidechains/#evm-compatibility).

## 📚 Prerequisites

Expand Down Expand Up @@ -105,7 +111,7 @@ yarn install

4. Start a local Avalanche L1:

It'd be ideal to run it with one command like `yarn avalanche`, but so far, you gotta [follow this instructions](./AVALANCHE-L1.md).
It'd be ideal to run it with one command like `yarn avalanche`, but so far, **you gotta [follow this instructions](./AVALANCHE-L1.md)**.

You'll start a local Avalanche L1 using [Ava Labs avalanche-starter-kit](https://github.com/ava-labs/avalanche-starter-kit). The network runs on your local machine and can be used for testing and development.

Expand Down
39 changes: 21 additions & 18 deletions avalanche_codespace_keepalive.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
To create a "keep alive" command that runs every 15 minutes and prevents a GitHub Codespace from going to sleep, you can use a combination of a shell script and a cron job. The shell script will execute a command that does nothing (e.g., echo "keep alive"), and the cron job will schedule this script to run every 15 minutes.
# By following these steps, you can create a "keep alive" command that runs every 15 minutes and prevents your GitHub Codespace from going to sleep.

Step-by-Step Plan
Create a Shell Script: Create a shell script that executes a command to keep the Codespace alive.
Set Up a Cron Job: Set up a cron job to run the shell script every 15 minutes.
Step 1: Create a Shell Script
Create a shell script named keep_alive.sh in your GitHub Codespace.
You can use a combination of a shell script and a cron job. The shell script will execute a command that does nothing (e.g., echo "keep alive"), and the cron job will schedule this script to run every 15 minutes.

> Pending task: Find out the right nothingness command to keep the terminal session active
# Step-by-Step Plan

- Create a Shell Script: Create a shell script that executes a command to keep the Codespace alive.
- Set Up a Cron Job: Set up a cron job to run the shell script every 15 minutes.

## Step 1: Create a shell script named keep_alive.sh in your GitHub Codespace.

`keep_alive.sh`

keep_alive.sh
Make the script executable:

Step 2: Set Up a Cron Job
Set up a cron job to run the keep_alive.sh script every 15 minutes.
`chmod +x keep_alive.sh`

## Step 2: Set up a cron job to run the keep_alive.sh script every 15 minutes.

Open the Crontab Editor: Open the crontab editor by running the following command:
Add the Cron Job: Add the following line to the crontab file to schedule the keep_alive.sh script to run every 15 minutes. Replace /path/to/keep_alive.sh with the actual path to your script.
Save and exit the crontab editor.
1. Open the Crontab Editor: Open the crontab editor by running the following command:
2. Add the Cron Job: Add the following line to the crontab file to schedule the keep_alive.sh script to run every 15 minutes. Replace /path/to/keep_alive.sh with the actual path to your script.
3. Save and exit the crontab editor.

Explanation
Shell Script: The keep_alive.sh script contains a simple command (echo "keep alive") that does nothing but keeps the terminal session active.
Cron Job: The cron job is set to run the keep_alive.sh script every 15 minutes (*/15 * * * *).
Example
If your keep_alive.sh script is located in the /home/codespace directory, the cron job entry would look like this:
> Explanation: Shell Script: The keep*alive.sh script contains a simple command (echo "keep alive") that does nothing but keeps the terminal session active. Cron Job: The cron job is set to run the keep_alive.sh script every 15 minutes (*/15 \_ \* \* \*).
By following these steps, you can create a "keep alive" command that runs every 15 minutes and prevents your GitHub Codespace from going to sleep.
> Example: If your keep_alive.sh script is located in the /home/codespace directory, the cron job entry would look like this:

0 comments on commit cca9760

Please sign in to comment.