Skip to content
Merged
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
10 changes: 10 additions & 0 deletions .github/actions/setup-anchor/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "Setup anchor-cli"
description: "Setup node js and anchor cli"
runs:
using: "composite"
steps:
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- run: cargo install --git https://github.com/coral-xyz/anchor --tag v${{ env.ANCHOR_CLI_VERSION }} anchor-cli --locked
shell: bash
7 changes: 7 additions & 0 deletions .github/actions/setup-dep/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: "Setup"
description: "Setup program dependencies"
runs:
using: "composite"
steps:
- run: sudo apt-get update && sudo apt-get install -y pkg-config build-essential libudev-dev
shell: bash
21 changes: 21 additions & 0 deletions .github/actions/setup-solana/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Setup Solana"
description: "Setup Solana"
runs:
using: "composite"
steps:
- uses: actions/cache@v4
name: Cache Solana Tool Suite
id: cache-solana
with:
path: |
~/.cache/solana/
~/.local/share/solana/
key: solana-${{ runner.os }}-v0000-${{ env.SOLANA_CLI_VERSION }}
- run: sh -c "$(curl -sSfL https://release.anza.xyz/v${{ env.SOLANA_CLI_VERSION }}/install)"
shell: bash
- run: echo "$HOME/.local/share/solana/install/active_release/bin/" >> $GITHUB_PATH
shell: bash
- run: solana-keygen new --no-bip39-passphrase
shell: bash
- run: solana config set --url localhost
shell: bash
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Dynamic-Fee-Sharing

on:
pull_request:
branches:
- main
- release_0.1.1

env:
SOLANA_CLI_VERSION: 2.1.0
NODE_VERSION: 22.15.0
ANCHOR_CLI_VERSION: 0.31.0
TOOLCHAIN: 1.76.0

jobs:
program_changed_files:
runs-on: ubuntu-latest
outputs:
program: ${{steps.changed-files-specific.outputs.any_changed}}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v18.6
with:
files: |
programs/dynamic-fee-sharing

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
with:
toolchain: ${{ env.TOOLCHAIN }}
components: clippy
# Cache rust, cargo
- uses: Swatinem/rust-cache@v1
- run: cargo test --package dynamic-fee-sharing
shell: bash

program_test:
runs-on: ubuntu-latest
needs: program_changed_files
if: needs.program_changed_files.outputs.program == 'true'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-solana
- uses: ./.github/actions/setup-dep
- uses: ./.github/actions/setup-anchor
# Install pnpm
- uses: pnpm/action-setup@v3 # docs https://pnpm.io/continuous-integration#github-actions
with:
version: 9.5.0 # Optional: specify a pnpm version
# Install rust + toolchain
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.TOOLCHAIN }}
components: clippy
# Cache rust, cargo
- uses: Swatinem/rust-cache@v1
# Cache node_modules
- uses: actions/cache@v4
id: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
# Testing
- run: pnpm install
shell: bash
- run: pnpm test
shell: bash
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

### Changed

### Deprecated

### Removed

### Fixed

### Security

### Breaking Changes

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

### Added
- Add new field `fee_vault_type` in `FeeVault` to distinguish between PDA-derived and keypair-derived fee vaults.
- Add new endpoint `fund_by_claiming_fee`, that allow share holder in fee vault to claim fees from whitelisted endpoints of DAMM-v2 or Dynamic Bonding Curve

43 changes: 42 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ codegen-units = 1
opt-level = 3
incremental = false
codegen-units = 1

[workspace.dependencies]
anchor-lang = {version = "0.31.1", features = ["event-cpi"]}
anchor-spl = "0.31.1"
bytemuck = { version = "1.20.0", features = ["derive", "min_const_generics"] }
Loading
Loading