forked from 0xsequence/sequence.js
-
Notifications
You must be signed in to change notification settings - Fork 1
demo dapp #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
demo dapp #191
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e7b277e
Revise security policy for reporting vulnerabilities (#173)
Dargon789 f2fd08b
V2 (#174)
Dargon789 cd4a860
Create web-sdk.yml (#175)
Dargon789 e6efe1f
sequence-core-dapp-1.0.0
Dargon789 dafd2ed
Create nextjs.yml (#176)
Dargon789 55d31a9
Update config.json (#185)
Dargon789 1da7771
Potential fix for code scanning alert no. 108: Incomplete regular exp…
Dargon789 0cdb1ee
0xsequence 1.9.19 (#179)
Dargon789 fb4f698
1.9.19 (#189)
Dargon789 88ad9d5
Bump the npm_and_yarn group across 2 directories with 25 updates (#177)
dependabot[bot] ad4195c
Potential fix for code scanning alert no. 73: Workflow does not conta…
Dargon789 a12fae6
Update lib/signals-implicit-mode/foundry.toml
Dargon789 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -4,7 +4,4 @@ about: Describe this issue template's purpose here. | |
| title: '' | ||
| labels: '' | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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,93 @@ | ||
| # Sample workflow for building and deploying a Next.js site to GitHub Pages | ||
| # | ||
| # To get started with Next.js see: https://nextjs.org/docs/getting-started | ||
| # | ||
| name: Deploy Next.js site to Pages | ||
|
|
||
| on: | ||
| # Runs on pushes targeting the default branch | ||
| push: | ||
| branches: ["master"] | ||
|
|
||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| # Build job | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Detect package manager | ||
| id: detect-package-manager | ||
| run: | | ||
| if [ -f "${{ github.workspace }}/yarn.lock" ]; then | ||
| echo "manager=yarn" >> $GITHUB_OUTPUT | ||
| echo "command=install" >> $GITHUB_OUTPUT | ||
| echo "runner=yarn" >> $GITHUB_OUTPUT | ||
| exit 0 | ||
| elif [ -f "${{ github.workspace }}/package.json" ]; then | ||
| echo "manager=npm" >> $GITHUB_OUTPUT | ||
| echo "command=ci" >> $GITHUB_OUTPUT | ||
| echo "runner=npx --no-install" >> $GITHUB_OUTPUT | ||
| exit 0 | ||
| else | ||
| echo "Unable to determine package manager" | ||
| exit 1 | ||
| fi | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "20" | ||
| cache: ${{ steps.detect-package-manager.outputs.manager }} | ||
| - name: Setup Pages | ||
| uses: actions/configure-pages@v5 | ||
| with: | ||
| # Automatically inject basePath in your Next.js configuration file and disable | ||
| # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). | ||
| # | ||
| # You may remove this line if you want to manage the configuration yourself. | ||
| static_site_generator: next | ||
| - name: Restore cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| .next/cache | ||
| # Generate a new cache whenever packages or source files change. | ||
| key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | ||
| # If source files changed but packages didn't, rebuild from a prior cache. | ||
| restore-keys: | | ||
| ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- | ||
| - name: Install dependencies | ||
| run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} | ||
| - name: Build with Next.js | ||
| run: ${{ steps.detect-package-manager.outputs.runner }} next build | ||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: ./out | ||
|
|
||
| # Deployment job | ||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
This file contains hidden or 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,9 +1,5 @@ | ||
| name: pnpm-format-label | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [labeled] | ||
|
|
||
This file contains hidden or 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,91 @@ | ||
| name: Publish Dists for Packages | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| build-and-push: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: ./.github/actions/install-dependencies | ||
|
|
||
| - name: Build package | ||
| run: pnpm run build | ||
|
|
||
| - name: Prepare dist branch | ||
| run: | | ||
| PACKAGES=("services/guard" "services/identity-instrument" "services/relayer" "wallet/core" "wallet/primitives" "wallet/wdk" "wallet/dapp-client") | ||
|
|
||
| for PACKAGE in "${PACKAGES[@]}"; do | ||
| BRANCH="dists/$PACKAGE" | ||
| PKG_DIR="packages/$PACKAGE" | ||
|
|
||
| echo "📦 Publishing $PACKAGE to $BRANCH" | ||
|
|
||
| mkdir -p /tmp/$PACKAGE | ||
| shopt -s dotglob | ||
| cp -r $PKG_DIR/* /tmp/$PACKAGE || true | ||
|
|
||
| cd /tmp/$PACKAGE | ||
| git init | ||
| git checkout -b $BRANCH | ||
|
|
||
| git config user.name "github-actions" | ||
| git config user.email "actions@github.com" | ||
|
|
||
| echo "🔧 Rewriting workspace: deps in package.json..." | ||
| node -e ' | ||
| const fs = require("fs"); | ||
| const path = require("path"); | ||
| const pkgPath = path.resolve("package.json"); | ||
| const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8")); | ||
| const repo = "github:0xsequence/sequence.js"; | ||
|
|
||
| const versions = { | ||
| "@0xsequence/guard": `${repo}#dists/services/guard`, | ||
| "@0xsequence/identity-instrument": `${repo}#dists/services/identity-instrument`, | ||
| "@0xsequence/relayer": `${repo}#dists/services/relayer`, | ||
| "@0xsequence/wallet-core": `${repo}#dists/wallet/core`, | ||
| "@0xsequence/wallet-primitives": `${repo}#dists/wallet/primitives`, | ||
| "@0xsequence/wallet-wdk": `${repo}#dists/wallet/wdk`, | ||
| }; | ||
|
|
||
| const rewrite = (deps = {}) => { | ||
| for (const k in deps) { | ||
| if (deps[k].startsWith("workspace:")) { | ||
| const version = versions[k]; | ||
|
|
||
| if (!version) { | ||
| console.warn(`No version found for ${k}, skipping...`); | ||
| continue; | ||
| } | ||
|
|
||
| deps[k] = version; | ||
| console.log(`→ ${k} → ${deps[k]}`); | ||
| } | ||
| } | ||
| }; | ||
|
|
||
| rewrite(pkg.dependencies); | ||
| fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2)); | ||
| ' | ||
|
|
||
| git add . | ||
| git commit -m "Build: publish $PACKAGE dist" | ||
|
|
||
| git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | ||
| git push -f origin HEAD:$BRANCH | ||
|
|
||
| cd - | ||
| done | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.