Skip to content

Commit

Permalink
Staging (#16)
Browse files Browse the repository at this point in the history
* Add `cancel_vesting_escrow` instruction (#15)

* Add `cancel_vesting_escrow` instruction

* Fix feedbacks

* Fix feedbacks

* Fix feedback + refactor code

* Update error msg & declaration

* Minor

* Support token_2022 program (#5)

* Support token-2022 program

* Add `cancel_vesting_escrow_v2` to support token_2022

* refactor

* Update fixes for feedbacks

* Remove Unauthorized

* remove unused errors

* add staging CI

* fix typo

* Fix feedbacks

* Revert constraint checking for sender_token

* Add support for ConfidentialTransferMint / PermanentDelegate / TransferHook / MintCloseAuthority & update feedbacks

* Fix feedbacks

* Update Feedbacks

* Fix feedback

* Add change log + increase compute unit for cancel instruction (#17)

* Add change log + increase compute unit for cancel instruction

* Update detailed changes

* fix comments

* Increase anchor to 0.30.1 & Add support for group/member token extensions (#18)

* Increase anchor to 0.30.1

* Implement support for GroupPointer & GroupMemberPointer

* Minor

* Remove support for Group & GroupMember

* Add changelog

* Update changelog

* change transfer hook error text (#20)

* harvest fees when closing token2022 token account (#19)

* harvest fees when closing token2022 token account

* remove signer for harvesting fees

* fix harvesting fees

* add test for harvest fee during cancelation

* fix test to include transfer_fee calculation

* nit: fix comments and function name

* update packages
  • Loading branch information
andrewsource147 authored Oct 24, 2024
1 parent 9eb3219 commit 2d45d40
Show file tree
Hide file tree
Showing 53 changed files with 7,212 additions and 1,793 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci-pr-main-program.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ on:
pull_request:
branches:
- main
- staging

env:
SOLANA_CLI_VERSION: 1.16.25
SOLANA_CLI_VERSION: 1.18.21
NODE_VERSION: 18.14.2
ANCHOR_CLI_VERSION: 0.28.0
ANCHOR_CLI_VERSION: 0.30.1

jobs:
program_changed_files:
Expand All @@ -32,12 +34,11 @@ jobs:
steps:
- uses: actions/checkout@v2
# Install rust + toolchain
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
- run: rustup toolchain install stable --component clippy
# Cache rust, cargo
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
prefix-key: "v1"
- run: cargo test --package locker
shell: bash

Expand All @@ -51,12 +52,11 @@ jobs:
- uses: ./.github/actions/setup-dep
- uses: ./.github/actions/setup-anchor
# Install rust + toolchain
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
- run: rustup toolchain install stable --component clippy
# Cache rust, cargo
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
prefix-key: "v1"
# Cache node_modules
- uses: actions/cache@v2
id: cache-node-modules
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ target
node_modules
test-ledger
.yarn
proptest-regressions
proptest-regressions

.idea
6 changes: 5 additions & 1 deletion Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ cluster = "Localnet"
wallet = "keys/localnet/admin-bossj3JvwiNK7pvjr149DqdtJxf2gdygbcmEPTkb2F1.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

[[test.genesis]]
address = "EBZDYx7599krFc4m2govwBdZcicr4GgepqC78m71nsHS"
program = "artifacts/transfer_hook_counter.so"
30 changes: 28 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,55 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Breaking Changes

## Program [0.3.0] [PR #5](https://github.com/jup-ag/jup-lock/pull/5) [PR #15](https://github.com/jup-ag/jup-lock/pull/15) [PR #18](https://github.com/jup-ag/jup-lock/pull/18)

### Breaking Changes

- Endpoint `create_vesting_escrow` add `cancel_mode` to indicates who can cancel the escrow.

### Changed

- Bump `anchor` version to 0.30.1

### Added

- escrow state add `token_program_flag` to indicates the token program used within the escrow.
- escrow state add `cancelled_at` to indicates the timestamp of the cancellation.
- Add new instruction `cancel_vesting_escrow`, which will cancel the escrow and close the `escrow_token` token account.
The claimable amount will be transferred to recipient and the remaining amount will be transferred to creator. The
instruction supports both `splToken` and `token2022`.
- Add new v2 instructions to support `token2022` extensions,
including: `TransferFeeConfig`, `TokenMetadata`, `MetadataPointer`, `ConfidentialTransferMint`, `ConfidentialTransferFeeConfig`, `PermanentDelegate`, `TransferHook`, `MintCloseAuthority`, `DefaultAccountState`, `GroupPointer`, `GroupMemberPointer`
for Token Mint and `MemoTransfer` for Token Account extensions
- `create_vesting_escrow_v2` to create the escrow relevant accounts.
- `claim_v2` to claim from the escrow.

## Program [0.2.2] [PR #8](https://github.com/jup-ag/jup-lock/pull/8)

### Breaking Changes
- Rename `cliff_amount` to `initial_unlock_amount`

- Rename `cliff_amount` to `initial_unlock_amount`

## Program [0.2.1] [PR #4](https://github.com/jup-ag/jup-lock/pull/4)

### Fixed

- Add check `recipient_token` in claim instruction
- Update `emit_cpi` in `claim` and `create_vesting_escrow` instruction

### Breaking Changes
- Endpoint `update vesting_escrow_recipient` allow signer to update `recipient_email` in `escrow_metadata`

- Endpoint `update vesting_escrow_recipient` allow signer to update `recipient_email` in `escrow_metadata`

## Program [0.2.0] [PR #3](https://github.com/jup-ag/jup-lock/pull/3)

### Changed

- Rename account `escrow` to `vesting_escrow`, `escrow_metadata` to `vesting_escrow_metadata`
- Rename endpoint `create_vesting_plan` to `create_vesting_escrow`
- Rename endpoint `create_escrow_metadata` to `create_vesting_escrow_metadata`
- Rename endpoint `update_recipient` to `update_vesting_escrow_recipient`

### Breaking Changes

- escrow state remove field `escrow_token` and add field `token_mint`
Loading

0 comments on commit 2d45d40

Please sign in to comment.