Skip to content

Commit

Permalink
Merge remote-tracking branch 'orbs/master' into orbs
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewlilley committed Aug 12, 2024
2 parents 48fea20 + 39b6f43 commit 738a9f5
Show file tree
Hide file tree
Showing 291 changed files with 32,662 additions and 3,098 deletions.
40 changes: 32 additions & 8 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,42 @@
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"privatePackages": {
"tag": false,
"version": false
},
"ignore": [
"@sushiswap/client",
"@sushiswap/react-query",
"@sushiswap/route-processor",
"@sushiswap/storybook",
"@sushiswap/extractor-api",
"@sushiswap/router-api",
"@sushiswap/token-list-api",
"@sushiswap/tokens-api",

"@sushiswap/storybook",
"@sushiswap/tron",
"web",

"eslint-config-sushi",
"@sushiswap/hardhat-config",
"@sushiswap/jest-config",
"@sushiswap/nextjs-config",
"@sushiswap/tailwindcss-config",
"@sushiswap/typescript-config",

"@sushiswap/pool-job",

"@sushiswap/bonds-sdk",
"@sushiswap/client",
"@sushiswap/database",
"@sushiswap/extractor",
"@sushiswap/graph-client",
"@sushiswap/hooks",
"@sushiswap/notifications",
"@sushiswap/react-query",
"@sushiswap/steer-sdk",
"@sushiswap/telemetry",
"@sushiswap/ui",
"@sushiswap/pool-job",
"@sushiswap/aptos",
"@sushiswap/tron",
"web"

"@sushiswap/route-processor",
"@sushiswap/tines-sandbox"
]
}
9 changes: 9 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Security Policy

## Reporting a Vulnerability

If you identify a vulnerability, please email [email protected] with:

- Description
- Suggested impact (Critical, High, Medium, Low)
- Minimal reproducible example
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 180
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- bug
- not stale
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
2 changes: 1 addition & 1 deletion .github/workflows/apps-web-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
block-number: [55359656]
block-number: [60306923]
chain-id: [137]
node-version: [20]
pnpm-version: [9.4.0]
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/changesets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Changesets
on:
push:
branches: [master]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
verify:
name: Verify
uses: ./.github/workflows/verify.yml
secrets: inherit

changesets:
name: Create version pull request
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
submodules: 'recursive'

- name: Install dependencies
uses: ./.github/actions/install

- name: Create Version Pull Request
uses: changesets/action@v1
with:
commit: 'chore: version package'
title: 'chore: version package'
version: pnpm changeset:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
name: Release
needs: verify
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
id-token: write
pull-requests: write

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
uses: ./.github/actions/install

- name: Publish to NPM
uses: changesets/action@v1
with:
createGithubReleases: ${{ github.ref == 'refs/heads/main' }}
publish: pnpm changeset:publish
version: pnpm changeset:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish Prerelease
if: steps.changesets.outputs.published != 'true'
continue-on-error: true
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
git reset --hard origin/main
pnpm clean
pnpm changeset version --no-git-tag --snapshot canary
pnpm changeset:prepublish
pnpm changeset publish --no-git-tag --snapshot canary --tag canary
13 changes: 13 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Pull request
on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
verify:
name: Verify
uses: ./.github/workflows/verify.yml
secrets: inherit
58 changes: 0 additions & 58 deletions .github/workflows/release.yml

This file was deleted.

35 changes: 29 additions & 6 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: Sushi - verify
# workflow_call:
# workflow_dispatch:
on:
pull_request:
types: [opened, synchronize]
workflow_call:
workflow_dispatch:
# pull_request:
# types: [opened, synchronize]
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
format:
name: Format
Expand All @@ -20,6 +20,7 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
token: ${{ secrets.PAT }}
ref: ${{ github.head_ref }}
- name: Install dependencies
Expand All @@ -42,6 +43,7 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
token: ${{ secrets.PAT }}
ref: ${{ github.head_ref }}
- name: Install dependencies
Expand All @@ -55,7 +57,28 @@ jobs:
commit_message: 'chore: lint'
commit_user_name: 'github-actions[bot]'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'


build:
name: Build
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
uses: ./.github/actions/install

- name: Build packages
run: pnpm exec turbo run build --filter=./packages/*

- name: Build config
run: pnpm exec turbo run build --filter=./config/*

# build:
# name: Build
# needs: [lint, format]
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.extractor
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ EXPOSE 80

ENV NODE_ENV=production

CMD NODE_OPTIONS=--max-old-space-size=$(expr $(echo "$(free -m)" | awk '/^Mem:/ {print $2}') - 512) node /app/apis/extractor/dist/index.js
CMD NODE_OPTIONS=--max-old-space-size=7680 node /app/apis/extractor/dist/index.js

# CMD NODE_OPTIONS=--max-old-space-size=$(expr $(echo "$(free -m)" | awk '/^Mem:/ {print $2}') - 512) node /app/apis/extractor/dist/index.js
4 changes: 3 additions & 1 deletion Dockerfile.router
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ EXPOSE 80

ENV NODE_ENV=production

CMD NODE_OPTIONS=--max-old-space-size=$(expr $(echo "$(free -m)" | awk '/^Mem:/ {print $2}') - 512) node /app/apis/router/dist/index.js
CMD NODE_OPTIONS=--max-old-space-size=1536 node /app/apis/router/dist/index.js

# CMD NODE_OPTIONS=--max-old-space-size=$(expr $(echo "$(free -m)" | awk '/^Mem:/ {print $2}') - 512) node /app/apis/router/dist/index.js
15 changes: 13 additions & 2 deletions apis/extractor/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ export const EXTRACTOR_CONFIG: Record<
sushiswapV3Factory(ChainId.ETHEREUM),
pancakeswapV3Factory(ChainId.ETHEREUM),
],
curveConfig: {
minPoolLiquidityLimitUSD: 1000,
},
tickHelperContractV3: SUSHISWAP_V3_TICK_LENS[ChainId.ETHEREUM],
tickHelperContractAlgebra:
'0x0000000000000000000000000000000000000000' as Address,
Expand Down Expand Up @@ -515,7 +518,10 @@ export const EXTRACTOR_CONFIG: Record<
[ChainId.SCROLL]: {
client: createPublicClient(extractorClientConfig(ChainId.SCROLL)),
factoriesV2: [sushiswapV2Factory(ChainId.SCROLL)],
factoriesV3: [sushiswapV3Factory(ChainId.SCROLL)],
factoriesV3: [
sushiswapV3Factory(ChainId.SCROLL),
uniswapV3Factory(ChainId.SCROLL),
],
tickHelperContractV3: SUSHISWAP_V3_TICK_LENS[ChainId.SCROLL],
tickHelperContractAlgebra:
'0x0000000000000000000000000000000000000000' as Address,
Expand All @@ -529,6 +535,7 @@ export const EXTRACTOR_CONFIG: Record<
factoriesV3: [
sushiswapV3Factory(ChainId.LINEA),
pancakeswapV3Factory(ChainId.LINEA),
uniswapV3Factory(ChainId.LINEA),
],
tickHelperContractV3: SUSHISWAP_V3_TICK_LENS[ChainId.LINEA],
tickHelperContractAlgebra:
Expand All @@ -540,7 +547,10 @@ export const EXTRACTOR_CONFIG: Record<
[ChainId.FILECOIN]: {
client: createPublicClient(extractorClientConfig(ChainId.FILECOIN)),
factoriesV2: [sushiswapV2Factory(ChainId.FILECOIN)],
factoriesV3: [sushiswapV3Factory(ChainId.FILECOIN)],
factoriesV3: [
sushiswapV3Factory(ChainId.FILECOIN),
uniswapV3Factory(ChainId.FILECOIN),
],
tickHelperContractV3: SUSHISWAP_V3_TICK_LENS[ChainId.FILECOIN],
tickHelperContractAlgebra:
'0x0000000000000000000000000000000000000000' as Address,
Expand Down Expand Up @@ -766,6 +776,7 @@ export const EXTRACTOR_CONFIG: Record<
],
factoriesV3: [
sushiswapV3Factory(ChainId.BLAST),
uniswapV3Factory(ChainId.BLAST),
{
address: '0x48d0F09710794313f33619c95147F34458BF7C3b',
provider: LiquidityProviders.MonoswapV3,
Expand Down
7 changes: 7 additions & 0 deletions apis/router/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CHAIN_ID=1
DRPC_ID=
ALCHEMY_ID=
PORT=3000
SENTRY_DSN=
SENTRY_ENVIRONMENT=local
EXTRACTOR_SERVER=http://localhost:3000
Loading

0 comments on commit 738a9f5

Please sign in to comment.