Skip to content

Commit

Permalink
Replace gateway with web component, in both vercel and web4 (#484)
Browse files Browse the repository at this point in the history
* set -g flag

* fmt

* configures index.html

* fix wallets

* fix wallets

* removes old gatewy

* standardize to login container

* introduces wallet for web4

* fmt

* set -g flag

* fmt

* configures index.html

* fix wallets

* fix wallets

* removes old gatewy

* standardize to login container

* introduces wallet for web4

* fmt

* fix test config

* fmt

* fix tests

* converts web4contract to use setStaticUrl

* rename and move contract code

* update public key

* fixes tests

* fmt

* fix editor test

* fixes wallet for build dao gateway and adds redirects

* fmt

* fix auth tests
  • Loading branch information
elliotBraem authored Aug 1, 2024
1 parent 604b677 commit 875eec9
Show file tree
Hide file tree
Showing 106 changed files with 1,920 additions and 16,464 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

27 changes: 0 additions & 27 deletions .eslintrc.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Deploy web4 contract to production
name: Deploy contract to production
on:
push:
branches: [main]
paths:
- web4contract/**
- contract/**

defaults:
run:
working-directory: ./web4contract
working-directory: ./contract

jobs:
test:
uses: ./.github/workflows/web4-test.yml
uses: ./.github/workflows/contract-test.yml

deploy-staging:
contract-deploy-staging:
name: Deploy to production
needs: [test]
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
name: Deploy web4 contract to staging
name: Deploy contract to staging
on:
pull_request:
paths:
- web4contract/**
- contract/**

defaults:
run:
working-directory: ./web4contract
working-directory: ./contract

jobs:
test:
uses: ./.github/workflows/web4-test.yml
uses: ./.github/workflows/contract-test.yml

deploy-staging:
contract-deploy-staging:
name: Deploy to staging subaccount
permissions:
pull-requests: write
needs: [test]
runs-on: ubuntu-latest
env:
NEAR_CONTRACT_PR_STAGING_ACCOUNT_ID: gh-${{ github.event.number }}.${{ vars.BOS_TESTNET_SIGNER_ACCOUNT_ID }}
BOS_BUILDDAO_TESTNET_SIGNER_PUBLIC_KEY: "ed25519:6ycWXZES2zEGPurZqP35AUQx92aAzuS7r9ea1GcSQQiT"

steps:
- name: Checkout repository
Expand All @@ -30,12 +31,12 @@ jobs:
- name: Create staging account
if: github.event.action == 'opened' || github.event.action == 'reopened'
run: |
near account create-account fund-myself "${{ env.NEAR_CONTRACT_PR_STAGING_ACCOUNT_ID }}" '10 NEAR' \
use-manually-provided-public-key "${{ vars.BOS_TESTNET_SIGNER_PUBLIC_KEY }}" \
near account create-account fund-myself "${{ env.NEAR_CONTRACT_PR_STAGING_ACCOUNT_ID }}" '3 NEAR' \
use-manually-provided-public-key "${{ env.BOS_BUILDDAO_TESTNET_SIGNER_PUBLIC_KEY }}" \
sign-as "${{ vars.BOS_TESTNET_SIGNER_ACCOUNT_ID }}" \
network-config "testnet" \
sign-with-plaintext-private-key \
--signer-public-key "${{ vars.BOS_TESTNET_SIGNER_PUBLIC_KEY }}" \
--signer-public-key "${{ env.BOS_BUILDDAO_TESTNET_SIGNER_PUBLIC_KEY }}" \
--signer-private-key "${{ secrets.BOS_BUILDDAO_TESTNET_SIGNER_PRIVATE_KEY }}" \
send
Expand All @@ -47,7 +48,7 @@ jobs:
without-init-call \
network-config "testnet" \
sign-with-plaintext-private-key \
--signer-public-key "${{ vars.BOS_TESTNET_SIGNER_PUBLIC_KEY }}" \
--signer-public-key "${{ env.BOS_BUILDDAO_TESTNET_SIGNER_PUBLIC_KEY }}" \
--signer-private-key "${{ secrets.BOS_BUILDDAO_TESTNET_SIGNER_PRIVATE_KEY }}" \
send
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Test web4 contract
name: Test contract
on:
workflow_call:

defaults:
run:
working-directory: ./web4contract
working-directory: ./contract

jobs:
code-formatting:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
name: Undeploy web4 contract from staging
name: Undeploy contract from staging
on:
pull_request:
types: [closed]
paths:
- web4contract/**
- contract/**

defaults:
run:
working-directory: ./web4contract
working-directory: ./contract

jobs:
cleanup-staging:
name: Cleanup staging account
runs-on: ubuntu-latest
env:
NEAR_CONTRACT_PR_STAGING_ACCOUNT_ID: gh-${{ github.event.number }}.${{ vars.BOS_TESTNET_SIGNER_ACCOUNT_ID }}
BOS_BUILDDAO_TESTNET_SIGNER_PUBLIC_KEY: "ed25519:6ycWXZES2zEGPurZqP35AUQx92aAzuS7r9ea1GcSQQiT"

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -26,6 +28,6 @@ jobs:
beneficiary "${{ vars.BOS_TESTNET_SIGNER_ACCOUNT_ID }}" \
network-config "testnet" \
sign-with-plaintext-private-key \
--signer-public-key "${{ vars.BOS_TESTNET_SIGNER_PUBLIC_KEY }}" \
--signer-public-key "${{ env.BOS_BUILDDAO_TESTNET_SIGNER_PUBLIC_KEY }}" \
--signer-private-key "${{ secrets.BOS_BUILDDAO_TESTNET_SIGNER_PRIVATE_KEY }}" \
send
19 changes: 19 additions & 0 deletions .github/workflows/web4-deploy-mainnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Deploy web4 to mainnet contract
on:
push:
branches: [main]
paths:
- public/**

jobs:
web4-deploy-mainnet:
name: Deploy web4 to mainnet contract
runs-on: ubuntu-latest
env:
NEAR_SIGNER_KEY: ${{ secrets.BOS_BUILDDAO_SIGNER_PRIVATE_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Call web4-deploy
run: |
yarn web4:deploy:mainnet
19 changes: 19 additions & 0 deletions .github/workflows/web4-deploy-testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Deploy web4 to testnet contract
on:
push:
branches: [develop]
paths:
- public/**

jobs:
web4-deploy-mainnet:
name: Deploy web4 to mainnet contract
runs-on: ubuntu-latest
env:
NEAR_SIGNER_KEY: ${{ secrets.BOS_BUILDDAO_TESTNET_SIGNER_PRIVATE_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Call web4-deploy
run: |
yarn web4:deploy:testnet
92 changes: 0 additions & 92 deletions CHANGELOG.md

This file was deleted.

3 changes: 2 additions & 1 deletion aliases.mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"new": "builddao.near",
"old": "buildhub.near",
"potlock": "potlock.near",
"every": "every.near"
"every": "every.near",
"web4_url": "builddao.near.page"
}
3 changes: 2 additions & 1 deletion aliases.testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"new": "builddao.testnet",
"old": "buildhub.testnet",
"potlock": "potlock.testnet",
"every": "allthethings.testnet"
"every": "allthethings.testnet",
"web4_url": "builddao.testnet.page"
}
13 changes: 0 additions & 13 deletions config/paths.js

This file was deleted.

13 changes: 0 additions & 13 deletions config/presets/loadPreset.js

This file was deleted.

6 changes: 0 additions & 6 deletions config/presets/webpack.analyze.js

This file was deleted.

Loading

0 comments on commit 875eec9

Please sign in to comment.