Skip to content

Commit

Permalink
Merge pull request #2 from solana-labs/main
Browse files Browse the repository at this point in the history
Get caught up
  • Loading branch information
0xodia authored Dec 3, 2024
2 parents 44e0fab + b3d2df6 commit 581872a
Show file tree
Hide file tree
Showing 1,498 changed files with 161,923 additions and 67,094 deletions.
7 changes: 7 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ MAINNET_RPC=https://mango.rpcpool.com
DEVNET_RPC=https://mango.devnet.rpcpool.com

DEFAULT_GOVERNANCE_PROGRAM_ID=GTesTBiEWE32WHXXE2S4XbZvA5CrEc4xs6ZgRe895dP

NEXT_PUBLIC_JUPTER_SWAP_API_ENDPOINT=https://quote-api.jup.ag/v6
NEXT_PUBLIC_API_ENDPOINT=https://api.realms.today/graphql
NEXT_PUBLIC_DISCORD_APPLICATION_CLIENT_ID=1042836142560645130
NEXT_PUBLIC_DISCORD_MATCHDAY_CLIENT_ID=1044361939322683442
NEXT_PUBLIC_HELIUS_MAINNET_RPC=
NEXT_PUBLIC_HELIUS_DEVNET_RPC=
13 changes: 11 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"plugins": ["@typescript-eslint", "unused-imports"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
// Uncomment the following lines to enable eslint-config-prettier
// Is not enabled right now to avoid issues with the Next.js repo
Expand All @@ -21,16 +22,24 @@
}
},
"rules": {
"react-hooks/exhaustive-deps": [
"warn",
{
"additionalHooks": "(useAsync|useAsyncCallback|useAsyncAbortable)"
}
],
"react/react-in-jsx-scope": 0,
"react/display-name": 0,
"react/prop-types": 0,
"unused-imports/no-unused-imports": "error",
//"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/indent": 0,
"@typescript-eslint/member-delimiter-style": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-non-null-assertion": 0, // days are numbered
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-use-before-define": 0,
Expand Down
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

94 changes: 94 additions & 0 deletions .github/workflows/ci-main-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: 'Main branch CI'

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
sast:
name: Static Security Tests
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialise CodeQL
uses: github/codeql-action/init@v2
with:
languages: 'javascript'

- name: Run CodeQL
uses: github/codeql-action/analyze@v2

sca:
name: Dependency Scan
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Report all vulnerabilities GitHub security tab
- name: Report on all vulnerabilities
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
ignore-unfixed: true
hide-progress: true
format: 'sarif'
output: 'trivy-results.sarif'

# Fail the job on critical vulnerabiliies with fix available
- name: Fail on critical vulnerabilities
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
ignore-unfixed: true
hide-progress: true
format: 'table'
severity: 'CRITICAL'
exit-code: '1'

- name: Upload scan results
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: 'trivy-results.sarif'

test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Cache dependencies
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn ci

- name: Run tests
run: yarn test-all

pass:
name: All tests pass
needs: ['sast', 'sca', 'test']
runs-on: ubuntu-latest
steps:
- run: echo ok
34 changes: 0 additions & 34 deletions .github/workflows/codeql-scan.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/depbot.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/deploy-docs.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/pull-request.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env
.env.local
.env.development
.env.development.local
.env.test.local
.env.production.local
Expand All @@ -41,3 +43,5 @@ yarn-error.log*

# Sentry
.sentryclirc

.vscode/settings.json
2 changes: 0 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged && yarn type-check && yarn lint
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/iron
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"semi": false,
"singleQuote": true
}
}
1 change: 1 addition & 0 deletions .vscode/deploy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please deploy
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

2 changes: 2 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--add.exact true
ignore-scripts true
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enableScripts: false
Binary file added 0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions @types/types.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import { EndpointTypes } from '@models/types'
import type { AccountInfo, PublicKey } from '@solana/web3.js'

export interface EndpointInfo {
name: EndpointTypes
url: string
}

export interface TokenAccount {
pubkey: PublicKey
account: AccountInfo<Buffer> | null
effectiveMint: PublicKey
}
export type GovernanceRole = 'council' | 'community';
Loading

0 comments on commit 581872a

Please sign in to comment.