Skip to content

feat: Use new canonical close account pattern#2169

Merged
armaniferrante merged 4 commits into
otter-sec:masterfrom
Arrowana:feat/new-canonical-close-account
Sep 6, 2022
Merged

feat: Use new canonical close account pattern#2169
armaniferrante merged 4 commits into
otter-sec:masterfrom
Arrowana:feat/new-canonical-close-account

Conversation

@Arrowana

@Arrowana Arrowana commented Sep 6, 2022

Copy link
Copy Markdown
Contributor

@vercel

vercel Bot commented Sep 6, 2022

Copy link
Copy Markdown

@Arrowana is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@Arrowana Arrowana mentioned this pull request Sep 6, 2022
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
@armaniferrante
armaniferrante merged commit 8ee4600 into otter-sec:master Sep 6, 2022
@Arrowana
Arrowana deleted the feat/new-canonical-close-account branch September 8, 2022 11:15
@tevdoradze

Copy link
Copy Markdown

@Arrowana does it make manual closing safe?

@Arrowana

Copy link
Copy Markdown
Contributor Author

@stegaBOB had a look and since the exit on Account does not do anything once the owner is no longer the program, it should be.

Henry-E pushed a commit to Henry-E/anchor that referenced this pull request Dec 6, 2022
yugure-orca added a commit to yugure-orca/whirlpools that referenced this pull request Mar 13, 2023
- ProgramResult to Result<()>
- add /// CHECK comments
- remove space attribute on Mint account
- change create_metadata_accounts_v2 to v3
- update testcases
  - Change in error code detected first
  - Change in account closing method
    otter-sec/anchor#2169
yugure-orca added a commit to orca-so/whirlpools that referenced this pull request Apr 7, 2023
## Anchor v0.26.0 upgrade (rebased)
Special thanks @dovahcrow !

* anchor 0.26 solana 1.14.12

use mpl-token-metadata 1.7 because rust 1.60 does not compile 1.8

* initialize_pool: ignore passed bump and use one anchor derived

- initialize_pool.test: update error codes, add a test case for ignoring bump

* update expected error messages

* add CHECK comments on UncheckedAccounts

* use create_metadata_accounts_v3 (v2 have been deprecated)

* update unit test cases (cargo test)

## Bundled Positions
* import bundled positions

* upgrade to Anchor v0.26.0 (position bundles related codes)

- ProgramResult to Result<()>
- add /// CHECK comments
- remove space attribute on Mint account
- change create_metadata_accounts_v2 to v3
- update testcases
  - Change in error code detected first
  - Change in account closing method
    otter-sec/anchor#2169

* cargo fmt

* update seed of BundledPosition

* change temporary mint_authority to position_bundle

* bump to v0.2.0

doc fields are added on IDL

* fix: accidental failure test cases

Fixed test cases that did not take into account rewards accruing up to just before the close.
This test case is not related to bundled positions.
The test case happened to fail, so I fixed them to make them all successful.

---------

Co-authored-by: Weiyuan Wu <weiyuan@crows.land>
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
@jamie-osec jamie-osec added this to the Pre-1.0 milestone Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants