Skip to content
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

v4 #1184

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open

v4 #1184

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .changeset/few-islands-ask.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@swapkit/toolboxes": major
"@swapkit/helpers": major
"@swapkit/plugins": major
"@swapkit/wallets": major
"@swapkit/core": major
"@swapkit/sdk": major
---

v4 core first beta
19 changes: 19 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@swapkit/core": "3.2.20",
"@swapkit/helpers": "2.4.3",
"@swapkit/plugins": "0.1.0",
"@swapkit/sdk": "2.2.17",
"@swapkit/toolboxes": "0.1.0",
"@swapkit/wallets": "2.0.20",
"@internal/playground-nextjs": "0.0.0",
"@internal/playground-node": "0.0.0",
"@internal/playground-vite": "0.0.0",
"@internal/tools-builder": "0.0.0",
"@internal/tools-github": "0.0.0",
"@internal/tools-typescript": "0.0.0"
},
"changesets": []
}
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# GitHub will automatically add review requests from these usernames for PRs

- @towanTG @0xGeneral @Chillios-ts
- @towanTG @ice-chillios
32 changes: 7 additions & 25 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ body:

If this is not a bug report, please use other relevant channels:

- [Ask questions on #swapkit-dev channel on Discord](https://discord.com/invite/thorswap)
- [Propose integrations on #partners-integrations on Discord](https://discord.com/invite/thorswap)

Before you proceed:

- Make sure you are on latest versions of SwapKit packages.
Expand Down Expand Up @@ -40,14 +37,12 @@ body:
description: |
What functionality is affected by the issue?
options:
- label: Swap
- label: Liquidity
- label: Savers
- label: Loan
- label: Wallet
- label: Transactions
- label: Api
- label: Liquidity
- label: Other
- label: Swap
- label: Transactions
- label: Wallet

- type: checkboxes
attributes:
Expand All @@ -57,23 +52,10 @@ body:
options:
- label: "@swapkit/sdk"
- label: "@swapkit/core"
- label: "@swapkit/api"
- label: "@swapkit/helpers"
- label: "@swapkit/tokens"

- label: "@swapkit/toolbox-cosmos"
- label: "@swapkit/toolbox-evm"
- label: "@swapkit/toolbox-utxo"

- label: "@swapkit/wallet-evm-extensions"
- label: "@swapkit/wallet-keepkey"
- label: "@swapkit/wallet-keplr"
- label: "@swapkit/wallet-keystore"
- label: "@swapkit/wallet-ledger"
- label: "@swapkit/wallet-okx"
- label: "@swapkit/wallet-trezor"
- label: "@swapkit/wallet-wc"
- label: "@swapkit/wallet-ctrl"
- label: "@swapkit/wallets"
- label: "@swapkit/toolboxes"
- label: "@swapkit/plugins"

- type: textarea
attributes:
Expand Down
122 changes: 93 additions & 29 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,101 @@
docs:
- internal/playground/**/*
- docs/**/*

api: packages/swapkit/api/**/*
tokens: packages/swapkit/tokens/**/*
- changed-files:
any-glob-to-any-file:
- 'internal/playground/**/*'
- 'docs/**/*'
core:
- packages/swapkit/core/**/*
- packages/swapkit/helpers/**/*
- packages/swapkit/types/**/*

cosmos: packages/toolboxes/cosmos/**/*
evm: packages/toolboxes/evm/**/*
solana: packages/toolboxes/solana/**/*
substrate: packages/toolboxes/substrate/**/*
utxo: packages/toolboxes/utxo/**/*
radix:
- packages/toolboxes/radix/**/*
- packages/wallets/radix/src/**/*
- changed-files:
any-glob-to-any-file:
- 'packages/core/src/**/*'
- 'packages/helpers/src/**/*'
plugin:
- changed-files:
any-glob-to-any-file:
- 'packages/plugins/src/**/*'
toolbox:
- changed-files:
any-glob-to-any-file:
- 'packages/toolboxes/src/**/*'

keystore: packages/wallets/keystore/**/*
hardware-wallet:
- packages/wallets/ledger/src/**/*
- packages/wallets/trezor/src/**/*
- packages/wallets/keepkey/src/**/*
- changed-files:
any-glob-to-any-file:
- 'packages/wallets/src/ledger/**/*'
- 'packages/wallets/src/trezor/**/*'
- 'packages/wallets/src/keepkey/**/*'

mobile-wallet:
- packages/wallets/wc/**/*
- packages/wallets/exodus/**/*
- packages/wallets/coinbase/**/*
- changed-files:
any-glob-to-any-file:
- 'packages/wallets/src/coinbase/**/*'
- 'packages/wallets/src/exodus/**/*'
- 'packages/wallets/src/walletconnect/**/*'

browser-extensions:
- packages/wallets/evm-extensions/**/*
- packages/wallets/keplr/**/*
- packages/wallets/okx/**/*
- packages/wallets/phantom/**/*
- packages/wallets/xdefi/**/*
- changed-files:
any-glob-to-any-file:
- 'packages/wallets/src/bitget/**/*'
- 'packages/wallets/src/talisman/**/*'
- 'packages/wallets/src/coinbase/**/*'
- 'packages/wallets/src/ctrl/**/*'
- 'packages/wallets/src/evm-extensions/**/*'
- 'packages/wallets/src/keplr/**/*'
- 'packages/wallets/src/okx/**/*'
- 'packages/wallets/src/phantom/**/*'
- 'packages/wallets/src/polkadotjs/**/*'
- 'packages/wallets/src/radix/**/*'

evm:
- changed-files:
any-glob-to-any-file:
- 'packages/toolboxes/src/evm/**/*'
- 'packages/plugins/src/evm/**/*'

radix:
- changed-files:
any-glob-to-any-file:
- 'packages/toolboxes/src/radix/**/*'
- 'packages/plugins/src/cosmos/**/*'

thorchain:
- changed-files:
any-glob-to-any-file:
- 'packages/plugins/src/thorchain/**/*'
- 'packages/toolboxes/src/cosmos/thorchainUtils/**/*'
- 'packages/toolboxes/src/cosmos/toolbox/thorchain.*'

chainflip:
- changed-files:
any-glob-to-any-file:
- 'packages/plugins/src/chainflip/**/*'

kado:
- changed-files:
any-glob-to-any-file:
- 'packages/plugins/src/kado/**/*'

cosmos:
- changed-files:
any-glob-to-any-file:
- 'packages/toolboxes/src/cosmos/**/*'

solana:
- changed-files:
any-glob-to-any-file:
- 'packages/toolboxes/src/solana/**/*'

substrate:
- changed-files:
any-glob-to-any-file:
- 'packages/toolboxes/src/substrate/**/*'

utxo:
- changed-files:
any-glob-to-any-file:
- 'packages/toolboxes/src/utxo/**/*'


keystore:
- changed-files:
any-glob-to-any-file:
- 'packages/wallets/src/keystore/**/*'
26 changes: 14 additions & 12 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,16 @@ jobs:
- name: Setup Repo
uses: ./tools/github/setup-repo

- name: Build
run: bun install; bun run build

- name: Lint Packages
run: |
bun --filter='./packages/toolboxes/**' lint && bun --filter='./packages/toolboxes/**' type-check
bun --filter='./packages/wallets/**' lint && bun --filter='./packages/wallets/**' type-check
bun --filter='./packages/plugins/**' lint && bun --filter='./packages/plugins/**' type-check
bun --filter='./packages/swapkit/**' lint && bun --filter='./packages/swapkit/**' type-check
- run: bun build:ci
- run: bun lint:ci

- name: Lint Playgrounds
continue-on-error: true
run: bun --filter='./playgrounds/**' lint && bun --filter='./playgrounds/**' type-check

- name: Test
if: contains(github.ref_name, 'nightly') == false
run: bun run test
run: bun test:ci

publish:
if: contains(github.ref_name, 'develop') || contains(github.ref_name, 'nightly') || contains(github.ref_name, 'beta')
Expand All @@ -58,15 +51,15 @@ jobs:

- name: Change nightly changeset
if: contains(github.ref_name, 'nightly')
continue-on-error: true
run: |
bun changeset version --snapshot nightly

- name: Change beta changeset
if: contains(github.ref_name, 'beta')
continue-on-error: true
run: |
echo 'publishName="Beta"' >> $GITHUB_OUTPUT
bun changeset pre enter beta
bun changeset version

- name: Set job params
shell: bash
Expand All @@ -86,6 +79,15 @@ jobs:
publish: bun publish-packages
setupGitUser: false

- name: Publish Beta to npm
uses: changesets/action@v1
if: contains(github.ref_name, 'beta')
with:
title: ":tada: Publish Beta"
version: bun version-bump
publish: bun publish-packages
setupGitUser: false

- name: Publish Nightly to npm
uses: changesets/action@v1
if: contains(github.ref_name, 'nightly')
Expand Down
19 changes: 1 addition & 18 deletions .github/workflows/check-token-lists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check Token List
on:
workflow_dispatch:
schedule:
- cron: "0 0,12 * * *"
- cron: "0 9 * * 1"

jobs:
check-and-update:
Expand Down Expand Up @@ -44,20 +44,3 @@ jobs:
title: "[Bot] Update Token List"
label: token-list
get_diff: true

# TODO: figure out how to create changeset from cli
# - name: Publish Token List
# if: ${{ steps.commit.outputs.numberOfChangedFiles > 0 }}
# run: |
# git config --global user.email "[email protected]"
# git config --global user.name "swapkit-bot"
# cp .npmrc.prod ./packages/swapkit/tokens/.npmrc
# bun changeset version --snapshot nightly
# cd packages/swapkit/tokens
# npm config list --no-workspaces
# npm publish --no-workspaces
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
# NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

4 changes: 2 additions & 2 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ on:
- pull_request_target

jobs:
triage:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
- uses: actions/labeler@v5
2 changes: 1 addition & 1 deletion .github/workflows/security-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
container:
image: returntocorp/semgrep:sha-b396800
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: semgrep ci --config p/ci --config p/xss --config p/jwt --config p/r2c --config p/react --config p/r2c-ci --config p/secrets --config p/javascript --config p/clientside-js --config p/owasp-top-ten --config p/security-audit --config p/github-actions --max-lines-per-finding 0 --force-color
20 changes: 9 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
node_modules/

.DS_Store
.aider*
.astro/
.idea/
dist/
build/
cache/
*.tsbuildinfo

.env
*.mjs
!*.config.mjs
coverage/
.DS_Store
dist/
node_modules/
references/

*.log
*.tsbuildinfo
.env
.npmrc
bunfig.toml
.aider*
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"recommendations": [
"astro-build.astro-vscode",
"antfu.file-nesting",
"biomejs.biome",
"bradlc.vscode-tailwindcss",
Expand Down
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "bun --cwd ./docs dev",
"name": "Docs dev",
"request": "launch",
"type": "node-terminal"
}
]
}
Loading
Loading