-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
219 changed files
with
32,969 additions
and
1,398 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Create Sismo Connect App | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
create-app: | ||
runs-on: ubuntu-latest | ||
if: contains(github.event.comment.body, '/create-app') | ||
steps: | ||
- name: Check if sismo-core organisation member | ||
id: is_organization_member | ||
uses: jamessingleton/[email protected] | ||
with: | ||
organization: "sismo-core" | ||
username: ${{ github.actor }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- if: steps.is_organization_member.outputs.result != 'true' | ||
run: exit 1 | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{secrets.SISMOBOT_TOKEN}} | ||
|
||
- name: Checkout Pull Request | ||
run: hub pr checkout ${{ github.event.issue.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SISMOBOT_TOKEN }} | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Create Sismo Connect App on the factory | ||
run: yarn sync-all-apps-factory | ||
env: | ||
SISMO_FACTORY_URL: https://factory-api.sismo.io | ||
SISMO_FACTORY_TOKEN: ${{ secrets.SISMO_FACTORY_TOKEN }} | ||
|
||
- name: Set up SSH | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.SISMOBOT_SSH }}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
- name: Commit and push filled appId | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "sismobot" | ||
git commit -a -m "feat: create Sismo Connect App and auto-fill appId" || exit 0 | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Upload zkDrop Metadata | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
create-app: | ||
runs-on: ubuntu-latest | ||
if: contains(github.event.comment.body, '/upload-metadata') | ||
steps: | ||
- name: Check if sismo-core organisation member | ||
id: is_organization_member | ||
uses: jamessingleton/[email protected] | ||
with: | ||
organization: "sismo-core" | ||
username: ${{ github.actor }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- if: steps.is_organization_member.outputs.result != 'true' | ||
run: exit 1 | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # fetch all branches and tags | ||
token: ${{secrets.SISMOBOT_TOKEN}} | ||
|
||
- name: Checkout Pull Request | ||
run: hub pr checkout ${{ github.event.issue.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SISMOBOT_TOKEN }} | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Get list of changed files from pull request | ||
id: changed-files | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SISMOBOT_TOKEN }} | ||
run: | | ||
PR_NUMBER=${{ github.event.issue.number }} | ||
# Make sure jq is installed | ||
sudo apt-get install -y jq | ||
# Fetch the list of files from the GitHub API | ||
FILES=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
"https://api.github.com/repos/sismo-core/app-store/pulls/${PR_NUMBER}/files") | ||
# Use jq to parse out the filenames and join them into one line | ||
FILENAMES=$(echo "$FILES" | jq -r '.[].filename' | tr '\n' ' ') | ||
# Set the output for subsequent steps | ||
echo "::set-output name=files::$FILENAMES" | ||
- name: Get modified spaces and apps | ||
id: updated-spaces | ||
run: | | ||
echo 'Changed files:' | ||
DEMO_UPDATED_SPACES=$(echo ${{steps.changed-files.outputs.files}} | awk 'BEGIN {OFS=FS=" "} {for(i=1; i<=NF; i++) {if ($i ~ /demo/){split($i,a,"/"); n=split(a[length(a)],b,"."); print b[1]}}}' | xargs) | ||
echo "::set-output name=demo_updated_spaces::'$(echo "$DEMO_UPDATED_SPACES")'" | ||
MAIN_UPDATED_SPACES=$(echo ${{steps.changed-files.outputs.files}} | awk 'BEGIN {OFS=FS=" "} {for(i=1; i<=NF; i++) {if ($i ~ /main/){split($i,a,"/"); n=split(a[length(a)],b,"."); print b[1]}}}' | xargs) | ||
echo "::set-output name=main_updated_spaces::'$(echo "$MAIN_UPDATED_SPACES")'" | ||
- name: Display changes | ||
run: | | ||
echo "[DEMO] Modified spaces and apps in commit:" | ||
echo "${{ steps.updated-spaces.outputs.demo_updated_spaces }}" | ||
echo "[MAIN] Modified spaces and apps in commit:" | ||
echo "${{ steps.updated-spaces.outputs.main_updated_spaces }}" | ||
- name: Run Upload metadata script [demo] | ||
env: | ||
NEXT_PUBLIC_NODE_ENV: demo | ||
PINATA_JWT_TOKEN: ${{ secrets.PINATA_JWT_TOKEN }} | ||
run: | | ||
yarn upload-zk-drop-metadata ${{ steps.updated-spaces.outputs.demo_updated_spaces }} | ||
- name: Run Upload metadata script [main] | ||
env: | ||
NEXT_PUBLIC_NODE_ENV: main | ||
PINATA_JWT_TOKEN: ${{ secrets.PINATA_JWT_TOKEN }} | ||
run: | | ||
yarn upload-zk-drop-metadata ${{ steps.updated-spaces.outputs.main_updated_spaces }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,6 @@ next-env.d.ts | |
|
||
.yarn | ||
.yarn.lock | ||
|
||
.space-configs/ | ||
.space-configs/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
{ | ||
"tabWidth": 2, | ||
"printWidth": 100 | ||
} | ||
"printWidth": 100, | ||
|
||
"overrides": [ | ||
{ | ||
"files": "*.sol", | ||
"options": { | ||
"tabWidth": 2, | ||
"printWidth": 100 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
`use client`; | ||
|
||
import SynapsProofOfLivenessCustomApp from "./synaps-proof-of-liveness"; | ||
import WorldcoinProofOfPersonhoodCustomApp from "./wordlcoin-proof-of-personhood"; | ||
|
||
export const customApps = { | ||
worldcoin: { | ||
"proof-of-personhood": <WorldcoinProofOfPersonhoodCustomApp />, | ||
}, | ||
synaps: { | ||
"proof-of-liveness": <SynapsProofOfLivenessCustomApp />, | ||
}, | ||
}; |
48 changes: 48 additions & 0 deletions
48
custom-apps/synaps-proof-of-liveness/components/Congratulations.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
"use client"; | ||
|
||
import { CustomAppConfig } from "@/space-configs/types"; | ||
import Button3D from "@/src/ui/Button3D"; | ||
import { useRouter } from "next/navigation"; | ||
import React from "react"; | ||
import { styled } from "styled-components"; | ||
|
||
const Container = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
`; | ||
|
||
const Title = styled.div` | ||
font-family: ${(props) => props.theme.fonts.semibold}; | ||
color: ${(props) => props.theme.colors.neutral1}; | ||
font-size: 32px; | ||
margin-top: 63px; | ||
`; | ||
|
||
const Subtitle = styled.div` | ||
font-family: ${(props) => props.theme.fonts.regular}; | ||
color: ${(props) => props.theme.colors.neutral3}; | ||
font-size: 16px; | ||
margin-bottom: 63px; | ||
text-align: center; | ||
`; | ||
|
||
type Props = { | ||
app: CustomAppConfig; | ||
}; | ||
|
||
export default function Congratulations({ app }: Props): JSX.Element { | ||
const router = useRouter(); | ||
|
||
return ( | ||
<Container> | ||
<Title style={{ marginBottom: 16 }}> | ||
{app?.templateConfig?.congratulationsMessage?.title} | ||
</Title> | ||
<Subtitle>{app?.templateConfig?.congratulationsMessage?.description}</Subtitle> | ||
<Button3D onClick={() => router.push("/synaps")} secondary> | ||
Back to the space | ||
</Button3D> | ||
</Container> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.