Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Add Token22 Extensions #2789

Merged
merged 35 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e3c8445
Add Token22 Extensions
Bhargavamacha Jan 25, 2024
dc196f9
Extension syntax update + add more extensions
Bhargavamacha Feb 7, 2024
e2802c1
remove unused token hook constraint
Bhargavamacha Feb 7, 2024
612b80d
remove unused clone()
Bhargavamacha Feb 7, 2024
19bf454
Merge branch 'master' into master
Bhargavamacha Feb 7, 2024
2ec3cee
fix transfer hook and group member pointer update functions
Bhargavamacha Feb 8, 2024
a3bf21e
add missing extensions
Bhargavamacha Feb 8, 2024
d82f7b8
fix the ahash version (#3)
niks3089 Mar 1, 2024
ec22b3c
Add Tests (#4)
Bhargavamacha Mar 1, 2024
0aac9dc
remove seperate extensions arg, derive from given extensions
Bhargavamacha Mar 11, 2024
32de4b2
format
Bhargavamacha Mar 11, 2024
90296aa
format + rename
Bhargavamacha Mar 11, 2024
cda4553
fix build error
Bhargavamacha Mar 11, 2024
33bafeb
remove dangling &
Bhargavamacha Mar 11, 2024
7df3458
remove dangling &
Bhargavamacha Mar 11, 2024
a251a96
non-init constraints + format + extra test
Bhargavamacha Mar 13, 2024
31da0e7
Merge branch 'master' into master
Bhargavamacha Mar 16, 2024
d828065
Merge branch 'master' into master
Bhargavamacha Apr 1, 2024
a7be343
Merge branch 'master' into master
Bhargavamacha Apr 4, 2024
0535022
fix token 2022 version
Bhargavamacha Apr 8, 2024
15034bf
Merge branch 'master' into master
Bhargavamacha Apr 8, 2024
3bcee04
update lock file
Bhargavamacha Apr 9, 2024
30d08dc
format
Bhargavamacha Apr 9, 2024
0954b7b
update spl-token-group-interface version
Bhargavamacha Apr 9, 2024
ab16094
remove unused token_2022 dependency
Bhargavamacha Apr 9, 2024
a2fd442
run prettier
Bhargavamacha Apr 9, 2024
caec033
remove extensions accidental token gating
Bhargavamacha Apr 9, 2024
1419902
feature gate extension logic
Bhargavamacha Apr 9, 2024
72be8af
feature gate extension logic
Bhargavamacha Apr 9, 2024
1651ddc
add token extensions to tests
Bhargavamacha Apr 9, 2024
37e87b6
make token_2022_extensions a default feature
Bhargavamacha Apr 9, 2024
515c555
fmt
Bhargavamacha Apr 9, 2024
4a6495b
fix token extensions test
Bhargavamacha Apr 9, 2024
4c114f7
update CHANGELOG
Bhargavamacha Apr 9, 2024
b4cde3c
Merge branch 'master' into master
Bhargavamacha Apr 9, 2024
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
19 changes: 11 additions & 8 deletions Cargo.lock
acheroncrypto marked this conversation as resolved.
Show resolved Hide resolved

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

3 changes: 1 addition & 2 deletions lang/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,5 @@ borsh = ">=0.9, <0.11"
bytemuck = "1"
solana-program = "1.16"
thiserror = "1"

# TODO: Remove. This crate has been added to fix a build error with the 1.16.0 release.
getrandom = { version = "0.2", features = ["custom"] }
getrandom = { version = "0.2", features = ["custom"] }
50 changes: 50 additions & 0 deletions lang/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,56 @@ pub enum ErrorCode {
/// 2023 - A mint token program constraint was violated
#[msg("An associated token account token program constraint was violated")]
ConstraintAssociatedTokenTokenProgram,
/// Extension constraints
///
/// 2024 - A group pointer extension constraint was violated
#[msg("A group pointer extension constraint was violated")]
ConstraintMintGroupPointerExtension,
/// 2025 - A group pointer extension authority constraint was violated
#[msg("A group pointer extension authority constraint was violated")]
ConstraintMintGroupPointerExtensionAuthority,
/// 2026 - A group pointer extension group address constraint was violated
#[msg("A group pointer extension group address constraint was violated")]
ConstraintMintGroupPointerExtensionGroupAddress,
/// 2027 - A group member pointer extension constraint was violated
#[msg("A group member pointer extension constraint was violated")]
ConstraintMintGroupMemberPointerExtension,
/// 2028 - A group member pointer extension authority constraint was violated
#[msg("A group member pointer extension authority constraint was violated")]
ConstraintMintGroupMemberPointerExtensionAuthority,
/// 2029 - A group member pointer extension member address constraint was violated
#[msg("A group member pointer extension group address constraint was violated")]
ConstraintMintGroupMemberPointerExtensionMemberAddress,
/// 2030 - A metadata pointer extension constraint was violated
#[msg("A metadata pointer extension constraint was violated")]
ConstraintMintMetadataPointerExtension,
/// 2031 - A metadata pointer extension authority constraint was violated
#[msg("A metadata pointer extension authority constraint was violated")]
ConstraintMintMetadataPointerExtensionAuthority,
/// 2032 - A metadata pointer extension metadata address constraint was violated
#[msg("A metadata pointer extension metadata address constraint was violated")]
ConstraintMintMetadataPointerExtensionMetadataAddress,
/// 2033 - A close authority extension constraint was violated
#[msg("A close authority constraint was violated")]
ConstraintMintCloseAuthorityExtension,
/// 2034 - A close authority extension authority constraint was violated
#[msg("A close authority extension authority constraint was violated")]
ConstraintMintCloseAuthorityExtensionAuthority,
/// 2035 - A permanent delegate extension constraint was violated
#[msg("A permanent delegate extension constraint was violated")]
ConstraintMintPermanentDelegateExtension,
/// 2036 - A permanent delegate extension authority constraint was violated
#[msg("A permanent delegate extension delegate constraint was violated")]
ConstraintMintPermanentDelegateExtensionDelegate,
/// 2037 - A transfer hook extension constraint was violated
#[msg("A transfer hook extension constraint was violated")]
ConstraintMintTransferHookExtension,
/// 2038 - A transfer hook extension authority constraint was violated
#[msg("A transfer hook extension authority constraint was violated")]
ConstraintMintTransferHookExtensionAuthority,
/// 2039 - A transfer hook extension transfer hook program id constraint was violated
#[msg("A transfer hook extension transfer hook program id constraint was violated")]
ConstraintMintTransferHookExtensionProgramId,

// Require
/// 2500 - A require expression was violated
Expand Down
Loading