Skip to content

Commit 0c0aa69

Browse files
committed
Updates
0 parents  commit 0c0aa69

File tree

2,081 files changed

+39277
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,081 files changed

+39277
-0
lines changed

.audits/2022-01-28.pdf

1.82 MB
Binary file not shown.

.audits/2022-05-05.pdf

236 KB
Binary file not shown.

.audits/2024-08-21.pdf

954 KB
Binary file not shown.

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* @yugure-orca @wjthieme @odcheung
2+
/programs/ @yugure-orca @philcchen @rawfalafel
3+

.github/ISSUE_TEMPLATE/bug.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Bug Report
2+
description: When you want to report something not working as expected.
3+
title: "[Bug] "
4+
labels: []
5+
body:
6+
- type: textarea
7+
id: details
8+
attributes:
9+
label: Details
10+
description: A clear and concise description of what the issue is.
11+
placeholder: Something did not go as expected.
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: reproduce
16+
attributes:
17+
label: Steps to reproduce
18+
description: The steps taken to reproduce the behavior.
19+
placeholder: "1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error"
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: expected
24+
attributes:
25+
label: Expected behavior
26+
description: A clear and concise description of what was supposed to happen.
27+
placeholder: The following things were supposed to happen.
28+
validations:
29+
required: true
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Feature Request
2+
description: When you have an idea for an improvement or new feature.
3+
title: "[Feature] "
4+
labels: []
5+
body:
6+
- type: textarea
7+
id: details
8+
attributes:
9+
label: Details
10+
description: A clear and concise description of what should be added.
11+
placeholder: Something needs to be added.
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: alternatives
16+
attributes:
17+
label: Alternatives considered
18+
description: A clear and concise description of any alternative solutions or features considered.
19+
placeholder: Other alternatives solutions are not viable.
20+
validations:
21+
required: true

.github/actions/anchor/action.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: 'Setup Anchor'
2+
description: 'Sets up an Anchor development environment.'
3+
4+
branding:
5+
icon: anchor
6+
color: blue
7+
8+
inputs:
9+
solana-cluster:
10+
description: 'The cluster to use for the solana sdk.'
11+
required: false
12+
default: 'devnet'
13+
solana-key:
14+
description: 'The private key to use for the solana sdk.'
15+
required: false
16+
rustc-version:
17+
description: 'The version of rustc to use.'
18+
default: 'v1.82.0'
19+
node-version:
20+
description: 'The version of node to use.'
21+
default: 'v22.8.0'
22+
solana-version:
23+
description: 'The version of solana to use.'
24+
default: 'v1.17.25'
25+
anchor-version:
26+
description: 'The version of anchor to use.'
27+
default: 'v0.29.0'
28+
29+
runs:
30+
using: "composite"
31+
steps:
32+
- name: Setup rustc
33+
run: |
34+
rust_version=${{ inputs.rustc-version }}
35+
rustup toolchain install ${rust_version#v}
36+
rustup default ${rust_version#v}
37+
rustup component add rustfmt clippy
38+
echo "RUST_LOG=" >> $GITHUB_ENV
39+
shell: bash
40+
- name: Cache rust
41+
uses: actions/cache@v4
42+
continue-on-error: true
43+
with:
44+
path: |
45+
~/.cargo/bin/
46+
~/.cargo/registry/index/
47+
~/.cargo/registry/cache/
48+
~/.cargo/git/db/
49+
**/target/
50+
key: rust-cache-${{ inputs.rustc-version }}-${{ github.job }}-${{ hashFiles('**/Cargo.toml') }}
51+
- name: Setup node
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: ${{ inputs.node-version }}
55+
cache: 'yarn'
56+
- name: Install Solana CLI
57+
run: |
58+
wget -qO- "https://release.anza.xyz/${{ inputs.solana-version }}/solana-release-x86_64-unknown-linux-gnu.tar.bz2" | tar -xvj
59+
echo "$PWD/solana-release/bin" >> $GITHUB_PATH
60+
shell: bash
61+
- name: Install Anchor CLI
62+
run: |
63+
anchor_version=${{ inputs.anchor-version }}
64+
npm install -g @coral-xyz/anchor-cli@${anchor_version#v}
65+
shell: bash
66+
- name: Configure Solana CLI
67+
run: |
68+
solana config set --url ${{ inputs.solana-cluster }}
69+
if [ -z "${{ inputs.solana-key }}" ]; then
70+
solana-keygen new --no-bip39-passphrase
71+
else
72+
echo "${{ inputs.solana-key }}" > ~/.config/solana/id.json
73+
fi
74+
solana airdrop 1 || true
75+
shell: bash
76+
- name: Log Installed Tools
77+
run: |
78+
echo "rustc: $(rustc --version)"
79+
echo "node: $(node --version)"
80+
echo "solana: $(solana --version)"
81+
echo "anchor: $(anchor --version)"
82+
shell: bash

.github/actions/cleanup/action.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Setup Version in monorepo'
2+
description: 'Set version of all packages in monorepo.'
3+
4+
branding:
5+
icon: trash-2
6+
color: red
7+
8+
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Remove Unnecessary Files
14+
run: |
15+
sudo rm -rf /usr/share/dotnet
16+
sudo rm -rf /opt/ghc
17+
sudo rm -rf "/usr/local/share/boost"
18+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
19+
shell: bash

.github/actions/version/action.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: 'Setup Version in monorepo'
2+
description: 'Set version of all packages in monorepo.'
3+
4+
branding:
5+
icon: type
6+
color: green
7+
8+
inputs:
9+
version:
10+
description: 'The version to update all packages to.'
11+
required: true
12+
manifest-file:
13+
description: 'The package to update the versions for.'
14+
required: true
15+
16+
runs:
17+
using: "composite"
18+
steps:
19+
- name: Get New Version Number
20+
id: version
21+
run: |
22+
VERSION=$(basename ${{ inputs.version }})
23+
if [[ $VERSION != v* ]]; then
24+
echo "Invalid version number" 1>&2
25+
exit 1
26+
fi
27+
echo "VERSION=${VERSION:1}" >> $GITHUB_OUTPUT
28+
shell: bash
29+
- name: Get Environment
30+
id: env
31+
run: |
32+
if [[ $(basename ${{ inputs.manifest-file }}) == "package.json" ]]; then
33+
ENV="npm"
34+
elif [[ $(basename ${{ inputs.manifest-file }}) == "Cargo.toml" ]]; then
35+
ENV="cargo"
36+
else
37+
echo "Unknown package type" 1>&2
38+
exit 1
39+
fi
40+
echo "ENV=$ENV" >> $GITHUB_OUTPUT
41+
shell: bash
42+
- name: Update npm Packages
43+
if: ${{ steps.env.outputs.ENV == 'npm' }}
44+
run: |
45+
jq --arg version "${{ steps.version.outputs.VERSION }}" '
46+
.version = $version
47+
' ${{ inputs.manifest-file }} > tmp.json && mv tmp.json ${{ inputs.manifest-file }}
48+
jq --arg version "${{ steps.version.outputs.VERSION }}" '
49+
if .dependencies then .dependencies |= with_entries(if .value == "*" then .value = $version else . end) else . end
50+
' ${{ inputs.manifest-file }} > tmp.json && mv tmp.json ${{ inputs.manifest-file }}
51+
shell: bash
52+
- name: Update Cargo Packages
53+
if: ${{ steps.env.outputs.ENV == 'cargo' }}
54+
run: |
55+
awk -v version="${{ steps.version.outputs.VERSION }}" '
56+
/^version = / { sub(/".*"/, "\"" version "\"") } { print }
57+
' ${{ inputs.manifest-file }} > tmp.toml && mv tmp.toml ${{ inputs.manifest-file }}
58+
awk -v version="${{ steps.version.outputs.VERSION }}" '
59+
/^\[dependencies\]/ { in_dependencies=1 }
60+
/^\[/ && !/^\[dependencies\]/ { in_dependencies=0 }
61+
in_dependencies && /path = "[^"]*"/ { sub(/path = "[^"]*"/, "version = \"" version "\"") } { print }
62+
' ${{ inputs.manifest-file }} > tmp.toml && mv tmp.toml ${{ inputs.manifest-file }}
63+
shell: bash

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
labels: [ ]
8+
groups:
9+
docusaurus:
10+
applies-to: version-updates
11+
patterns:
12+
- "@docusaurus/*"
13+
- package-ecosystem: "cargo"
14+
directory: "/"
15+
schedule:
16+
interval: "daily"
17+
labels: [ ]
18+
groups:
19+
program-dependencies:
20+
applies-to: version-updates
21+
dependency-type: production
22+
- package-ecosystem: "github-actions"
23+
directory: "/"
24+
schedule:
25+
interval: "daily"
26+
labels: [ ]

0 commit comments

Comments
 (0)