Skip to content

Commit

Permalink
project upload
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy03212 committed Oct 28, 2023
0 parents commit ccab49f
Show file tree
Hide file tree
Showing 152 changed files with 17,127 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lib
types
11 changes: 11 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
]
}
65 changes: 65 additions & 0 deletions .github/workflows/deploy-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: nightly

on:
workflow_dispatch:
schedule:
- cron: "0 20 * * *"

env:
FOUNDRY_PROFILE: ci
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}

permissions:
pull-requests: write
deployments: write
contents: write

jobs:
build:
strategy:
fail-fast: true

name: MUD project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
ref: "develop" # checkout develop

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Install dependencies
run: pnpm install

- name: deploy on lattice testnet
run: cd packages/contracts; pnpm run deploy:alt

- name: build
run: pnpm build

- name: Vercel Action
uses: amondnet/vercel-action@v25

with:
vercel-token: ${{ secrets.VERCEL_TOKEN_DEV }} # Required
vercel-org-id: ${{ secrets.ORG_ID_DEV}} #Required
vercel-project-id: ${{ secrets.PROJECT_ID_DEV}} #Required
working-directory: ./packages/client/dist
vercel-args: "--prod" #Optional
scope: ${{secrets.TEAM_SLUG_DEV}}
62 changes: 62 additions & 0 deletions .github/workflows/vercel-preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: preview

on:
pull_request:

env:
FOUNDRY_PROFILE: ci
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}

permissions:
pull-requests: write
deployments: write
contents: write

jobs:
build:
strategy:
fail-fast: true

name: MUD project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Install dependencies
run: pnpm install

- name: deploy on lattice testnet
run: cd packages/contracts; pnpm run deploy:alt

- name: build
run: pnpm build

- name: Vercel Action
uses: amondnet/vercel-action@v25

with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
vercel-org-id: ${{ secrets.ORG_ID}} #Required
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
working-directory: ./packages/client/dist
scope: ${{secrets.TEAM_SLUG}}
61 changes: 61 additions & 0 deletions .github/workflows/vercel-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: prod

on:
push:
branches:
- main

env:
FOUNDRY_PROFILE: ci

permissions:
pull-requests: write
deployments: write
contents: write

jobs:
build:
strategy:
fail-fast: true

name: MUD project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Install dependencies
run: pnpm install

- name: build
run: pnpm build

- name: Vercel Action
uses: amondnet/vercel-action@v25

with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
vercel-org-id: ${{ secrets.ORG_ID}} #Required
vercel-args: "--prod" #Optional
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
working-directory: ./packages/client/dist
scope: ${{secrets.TEAM_SLUG}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
18 changes: 18 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[submodule "packages/contracts/lib/chainlink"]
path = packages/contracts/lib/chainlink
url = https://github.com/smartcontractkit/chainlink
[submodule "packages/circuits/circomlib"]
path = packages/circuits/circomlib
url = https://github.com/iden3/circomlib.git
[submodule "packages/contracts/lib/openzeppelin-contracts"]
path = packages/contracts/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "packages/contracts/lib/cement"]
path = packages/contracts/lib/cement
url = https://github.com/HelheimLabs/cement
[submodule "packages/contracts/lib/forge-std"]
path = packages/contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "packages/contracts/lib/ds-test"]
path = packages/contracts/lib/ds-test
url = https://github.com/dapphub/ds-test
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lib
types
Empty file added .prettierrc
Empty file.
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["JuanBlanco.solidity"]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"solidity.monoRepoSupport": true,
"editor.formatOnSave": true,
"solidity.formatter": "forge"
}
Loading

0 comments on commit ccab49f

Please sign in to comment.