From ba5a1933901440fd40f163e2b7f81249ad1f802c Mon Sep 17 00:00:00 2001 From: bayge Date: Fri, 13 Dec 2024 15:09:49 +1030 Subject: [PATCH] Start to support mainnet ETH and do docs deployment --- .github/workflows/deploy-docs.yml | 43 +++++++++++++++++++++++++ README.md | 4 +++ web/public/images/icons/eth.svg | 3 ++ web/src/components/disclaimer/about.tsx | 7 ++-- web/src/components/disclaimer/how.tsx | 22 ++----------- web/src/components/header.tsx | 2 +- web/src/components/leaderbord/stats.tsx | 2 +- web/src/components/streams/detail.tsx | 4 +-- web/src/config.ts | 6 ++-- 9 files changed, 63 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/deploy-docs.yml create mode 100644 web/public/images/icons/eth.svg diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..cdcda46 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,43 @@ +name: Deploy documentation + +on: + push: + branches: + - main + paths: + - docs/** + - src/** + - README.md + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install Foundry toolchain + run: | + curl -OL https://github.com/foundry-rs/foundry/releases/download/nightly/foundry_nightly_linux_amd64.tar.gz + tar -xzf foundry_nightly_linux_amd64.tar.gz + sudo mv forge /usr/local/bin + + - name: Generate documentation + run: | + forge doc -b + + - name: Publish to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_TOKEN }} + # update + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + # update + projectName: ${{ secrets.CLOUDFLARE_DOCS_PROJECT_NAME }} + directory: . + # to enable Github Deployments + gitHubToken: ${{ secrets.GITHUB_TOKEN }} + branch: main + workingDirectory: docs/book diff --git a/README.md b/README.md index a9d7bb8..66b7233 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # Purr Stream [![codecov](https://codecov.io/gh/fluidity-money/purr.stream/graph/badge.svg?token=P1AESWS7OT)](https://codecov.io/gh/fluidity-money/purr.stream) +Purr.Stream is a donation webapp where donated ETH is given to animal shelters around the +world with a leaderboard system. The administrator of the contract takes the amounts that +were donated for regular donation. + ## Deployment details ### Superposition mainnet diff --git a/web/public/images/icons/eth.svg b/web/public/images/icons/eth.svg new file mode 100644 index 0000000..980ee2b --- /dev/null +++ b/web/public/images/icons/eth.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:066b2a60df66fbe2c11bbf7d37201552fd27e4edca73cac4a3e7ebda3ceb2486 +size 1345 diff --git a/web/src/components/disclaimer/about.tsx b/web/src/components/disclaimer/about.tsx index 2ad3dcd..58fd288 100644 --- a/web/src/components/disclaimer/about.tsx +++ b/web/src/components/disclaimer/about.tsx @@ -25,10 +25,9 @@ export default function DisclaimerAbout() { Superposition chain - , users can connect their crypto wallets, donate SPN testnet - tokens to specific cat streams and their corresponding - country's organisation, participate in a weekly leaderboard, - and engage in Discord chats based on donations. + , users can connect their crypto wallets, donate ETH tokens to specific cat + streams and their corresponding country's organisation, participate in + a weekly leaderboard, and engage in Discord chats based on donations.

diff --git a/web/src/components/disclaimer/how.tsx b/web/src/components/disclaimer/how.tsx index b954ed8..d10518c 100644 --- a/web/src/components/disclaimer/how.tsx +++ b/web/src/components/disclaimer/how.tsx @@ -9,7 +9,7 @@ export default function DisclaimerHow() {
- Login and connect you crypto wallet to donate your testnet SPN + Login and connect you crypto wallet to donate your ETH to your favourite cat stream! Each stream corresponds to a specific country and an animal welfare organisation :3
If you're new to the Web3 space, here is a tutorial! @@ -40,22 +40,6 @@ export default function DisclaimerHow() {
{" "}

- - Get SPN Tokens: -
-
- - {" "} - • Click on the faucet button to gain SPN tokens for donations. -
• For detailed instructions on using the Superposition - faucet, visit{" "} -
- - Superposition Faucet Guide - - - .
-
@@ -70,7 +54,7 @@ export default function DisclaimerHow() { {" "} • Go to your chosen cat stream. -
• Spam the donate button to contribute SPN tokens. +
• Spam the donate button to contribute ETH tokens.

@@ -80,7 +64,7 @@ export default function DisclaimerHow() { {" "} - • The more you click donate & engage, the more SPN will be + • The more you click donate & engage, the more ETH will be donated to your favourite cat.
{" "}
diff --git a/web/src/components/header.tsx b/web/src/components/header.tsx index ffa9a6c..3b549af 100644 --- a/web/src/components/header.tsx +++ b/web/src/components/header.tsx @@ -26,7 +26,7 @@ export default function Header() { />
- Donate your Testnet SPN and support different shelters across the + Donate your ETH and support different shelters across the world.
diff --git a/web/src/components/leaderbord/stats.tsx b/web/src/components/leaderbord/stats.tsx index 9ff3ea9..c8ded66 100644 --- a/web/src/components/leaderbord/stats.tsx +++ b/web/src/components/leaderbord/stats.tsx @@ -24,7 +24,7 @@ export default function Stats() {
- Total $SPN + Total $ETH
{totalDonation} diff --git a/web/src/components/streams/detail.tsx b/web/src/components/streams/detail.tsx index 00d8efe..00c3821 100644 --- a/web/src/components/streams/detail.tsx +++ b/web/src/components/streams/detail.tsx @@ -2,7 +2,7 @@ import { useStreamStore } from "@/stores/streamStore"; import Image from "next/image"; -import SPNIcon from "#/images/icons/spn.svg"; +import ETHIcon from "#/images/icons/eth.svg"; import DonateButton from "@/components/buttons/donateButton"; import LeaderboardButton from "@/components/buttons/leaderboardButton"; import { useQuery } from "@tanstack/react-query"; @@ -53,7 +53,7 @@ export default function StreamDetail() {
- SPN + ETH
{donation} diff --git a/web/src/config.ts b/web/src/config.ts index 750e80a..8d9cf01 100644 --- a/web/src/config.ts +++ b/web/src/config.ts @@ -17,9 +17,9 @@ const chains = { rpc: "https://testnet-rpc.superposition.so", }, mainnet: { - name: "Superposition Mainnet", - id: 98985, - nativeCurrency: { name: "Superposition", symbol: "SPN", decimals: 18 }, + name: "Superposition", + id: 55244, + nativeCurrency: { name: "Ethereum", symbol: "ETH", decimals: 18 }, rpc: "https://rpc.superposition.so", }, },