Skip to content

Commit

Permalink
Start to support mainnet ETH and do docs deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
af-afk committed Dec 13, 2024
1 parent 07f7c4b commit ba5a193
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 30 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions web/public/images/icons/eth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions web/src/components/disclaimer/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ export default function DisclaimerAbout() {
Superposition chain
</span>
<span className="text-xs font-medium leading-[18px] text-[#aeaeae]">
, users can connect their crypto wallets, donate SPN testnet
tokens to specific cat streams and their corresponding
country&apos;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&apos;s organisation, participate in
a weekly leaderboard, and engage in Discord chats based on donations.
</span>
</p>
</div>
Expand Down
22 changes: 3 additions & 19 deletions web/src/components/disclaimer/how.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function DisclaimerHow() {
<div className="flex flex-col items-start justify-start gap-2">
<div className="">
<span className="text-xs font-bold leading-[18px] text-[#aeaeae]">
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 <br />
If you&apos;re new to the Web3 space, here is a tutorial!
Expand Down Expand Up @@ -40,22 +40,6 @@ export default function DisclaimerHow() {
<br />{" "}
</span>
<br />
<span className="text-xs font-bold leading-[18px] text-[#aeaeae]">
Get SPN Tokens:
<br />
</span>
<span className="text-xs font-medium leading-[18px] text-[#aeaeae]">
{" "}
• Click on the faucet button to gain SPN tokens for donations.
<br /> • For detailed instructions on using the Superposition
faucet, visit{" "}
</span>
<span className="text-xs font-medium leading-[18px] text-[#aeaeae] underline">
Superposition Faucet Guide
</span>
<span className="text-xs font-medium leading-[18px] text-[#aeaeae]">
.<br />
</span>
</div>
</div>
<div className="flex flex-col items-start justify-start gap-2">
Expand All @@ -70,7 +54,7 @@ export default function DisclaimerHow() {
<span className="text-xs font-medium leading-[18px] text-[#aeaeae]">
{" "}
• Go to your chosen cat stream.
<br /> • Spam the donate button to contribute SPN tokens.
<br /> • Spam the donate button to contribute ETH tokens.
<br />
<br />
</span>
Expand All @@ -80,7 +64,7 @@ export default function DisclaimerHow() {
</span>
<span className="text-xs font-medium leading-[18px] text-[#aeaeae]">
{" "}
• 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.
<br />{" "}
</span>
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Header() {
/>
<div className="hidden h-[19px] shrink grow basis-0 items-center justify-center gap-1.5 md:flex">
<div className="text-sm font-medium text-neutral-500">
Donate your Testnet SPN and support different shelters across the
Donate your ETH and support different shelters across the
world.
</div>
<Link href={"#"} className="flex items-center justify-start gap-0.5">
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/leaderbord/stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function Stats() {
<div className="flex items-center justify-start gap-2.5">
<div className="inline-flex flex-col items-start justify-center gap-0.5">
<div className="whitespace-nowrap text-sm font-medium text-neutral-400">
Total $SPN
Total $ETH
</div>
<div className="text-xl font-bold text-neutral-100">
{totalDonation}
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/streams/detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -53,7 +53,7 @@ export default function StreamDetail() {
</div>
<div className="inline-flex items-center justify-start gap-2.5">
<div className="relative h-5 w-[21px] rounded-[41px]">
<Image src={SPNIcon} width={21} height={21} alt="SPN" />
<Image src={ETHIcon} width={21} height={21} alt="ETH" />
</div>
<div className="text-xl font-medium text-neutral-100">
{donation}
Expand Down
6 changes: 3 additions & 3 deletions web/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
Expand Down

0 comments on commit ba5a193

Please sign in to comment.