Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/setup-anchor/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ description: "Setup bun and anchor cli"
runs:
using: "composite"
steps:
- uses: oven-sh/setup-bun@v2
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- name: Cache Anchor CLI
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: cache-anchor
with:
path: ~/.cargo/bin/anchor
key: anchor-cli-${{ runner.os }}-${{ env.ANCHOR_CLI_VERSION }}
- if: steps.cache-anchor.outputs.cache-hit != 'true'
run: cargo install --git https://github.com/coral-xyz/anchor --tag v${{ env.ANCHOR_CLI_VERSION }} anchor-cli --locked
run: cargo install --git https://github.com/otter-sec/anchor --tag v${{ env.ANCHOR_CLI_VERSION }} anchor-cli --locked
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/setup-solana/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Setup Solana"
runs:
using: "composite"
steps:
- uses: actions/cache@v4
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
name: Cache Solana Tool Suite
id: cache-solana
with:
Expand Down
11 changes: 11 additions & 0 deletions .github/actions/setup-versions/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "Setup Versions"
description: "Read version configs from repo files and export as env vars"
runs:
using: "composite"
steps:
- name: Extract versions from config files
run: |
echo "TOOLCHAIN=$(grep 'channel' rust-toolchain.toml | sed 's/.*"\(.*\)"/\1/')" >> $GITHUB_ENV
echo "SOLANA_CLI_VERSION=$(grep 'solana_version' Anchor.toml | sed 's/.*"\(.*\)"/\1/')" >> $GITHUB_ENV
echo "ANCHOR_CLI_VERSION=$(grep 'anchor_version' Anchor.toml | sed 's/.*"\(.*\)"/\1/')" >> $GITHUB_ENV
shell: bash
42 changes: 25 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,46 @@ on:
- main
- release_*

env:
SOLANA_CLI_VERSION: 3.1.10
ANCHOR_CLI_VERSION: 1.0.2
TOOLCHAIN: 1.93.0

jobs:
program_changed_files:
runs-on: ubuntu-latest
outputs:
program: ${{steps.changed-files-specific.outputs.any_changed}}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
fetch-depth: 0
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v18.6
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
with:
files: |
programs/dynamic-fee-sharing
programs/dynamic-fee-sharing/**
libs/**
idls/**
Cargo.toml
Cargo.lock
rust-toolchain.toml
Anchor.toml
package.json
bun.lock
tsconfig.json
tests/**
.github/**

cargo_test:
runs-on: ubuntu-latest
needs: program_changed_files
if: needs.program_changed_files.outputs.program == 'true'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: ./.github/actions/setup-versions
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master (2026-10-16)
with:
toolchain: ${{ env.TOOLCHAIN }}
components: clippy
# Cache rust, cargo
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- run: cargo test --package dynamic-fee-sharing
shell: bash

Expand All @@ -47,27 +54,28 @@ jobs:
needs: program_changed_files
if: needs.program_changed_files.outputs.program == 'true'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: ./.github/actions/setup-versions
- uses: ./.github/actions/setup-solana
- uses: ./.github/actions/setup-dep
- uses: ./.github/actions/setup-anchor
# Install bun
- uses: oven-sh/setup-bun@v2
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
# Install rust + toolchain
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master (2026-10-16)
with:
toolchain: ${{ env.TOOLCHAIN }}
components: clippy
# Cache rust, cargo
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
# Cache node_modules
- uses: actions/cache@v4
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./bun.lock') }}
# Testing
- run: bun install
shell: bash
- run: bun run test
- run: bun run build-test
shell: bash
7 changes: 2 additions & 5 deletions Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[toolchain]
anchor_version = "1.0.2"
solana_version = "3.1.10"
anchor_version = "1.2.1"
solana_version = "4.1.2"
package_manager = "bun"

[features]
Expand All @@ -10,9 +10,6 @@ skip-lint = false
[programs.localnet]
dynamic_fee_sharing = "dfsdo2UqvwfN8DuUVrMRNfQe11VaiNoKcMqLHVvDPzh"

[registry]
url = "https://api.apr.dev"

[provider]
cluster = "localnet"
wallet = "~/.config/solana/id.json"
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Breaking Changes

## dynamic-fee-sharing [0.1.3]

### Added

- New endpoint `update_user_address(index, new_address)`: the user at `index` moves its share to `new_address`, signed by its current address. The share and the fee not claimed yet stay with the slot, so they go to the new address. It emits `EvtUpdateUserAddress`. Only the current address can sign, so it is meant to rotate a wallet, not to recover from a compromised key: whoever holds that key can update the address too

### Changed

- Update to anchor 1.2.1 and solana 4.1.2, building for SBPF v3 with platform-tools v1.57
- Enable `#[program(legacy_idl)]` to keep the legacy on-chain IDL instructions, managed with `anchor legacy-idl` (`anchor idl` now uses the Program Metadata program). Anchor marks it as deprecated

## dynamic-fee-sharing [0.1.2] [PR #15](https://github.com/MeteoraAg/dynamic-fee-sharing/pull/15)

### Added
Expand Down
Loading
Loading