Skip to content

Commit

Permalink
update mpl token auth rules to the recent 1.18 solana (#154)
Browse files Browse the repository at this point in the history
update mpl-token-auth-rules to the recent 1.18 solana
  • Loading branch information
rwwwx authored Jul 22, 2024
1 parent e03ae81 commit fd9026d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CARGO_TERM_COLOR=always
NODE_VERSION=18.x
PROGRAMS=["token-auth-rules"]
RUST_VERSION=1.70.0
SOLANA_VERSION=1.17.20
RUST_VERSION=1.79.0
SOLANA_VERSION=1.18.9
COMMIT_USER_NAME="github-actions[bot]"
COMMIT_USER_EMAIL="41898282+github-actions[bot]@users.noreply.github.com"
4 changes: 2 additions & 2 deletions .github/workflows/build-programs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ on:
inputs:
rust:
description: Rust version
default: 1.70.0
default: 1.79.0
required: true
type: string
solana:
description: Solana version
default: 1.17.20
default: 1.18.9
required: true
type: string

Expand Down
13 changes: 8 additions & 5 deletions programs/token-auth-rules/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ rmp-serde = "1.1.1"
serde = { version = "1.0.149", features = ["derive"]}
serde_with = { version = "1.14.0", optional = true }
shank = "0.3.0"
solana-program = ">= 1.14.13, < 1.18"
solana-zk-token-sdk = ">= 1.14.13, < 1.18"
solana-program = ">= 1.14.13, < 1.19"
solana-zk-token-sdk = ">= 1.14.13, < 1.19"
thiserror = "1.0"

[features]
Expand All @@ -31,9 +31,9 @@ test-sbf = []
[dev-dependencies]
assert_matches = "1.5.0"
serde_json = "1.0.87"
solana-logger = ">= 1.14.13, < 1.18"
solana-program-test = ">= 1.14.13, < 1.18"
solana-sdk = ">= 1.14.13, < 1.18"
solana-logger = ">= 1.14.13, < 1.19"
solana-program-test = ">= 1.14.13, < 1.19"
solana-sdk = ">= 1.14.13, < 1.19"
spl-associated-token-account = { version = "1.1.1", features = ["no-entrypoint"] }
spl-token = { version = "3.5.0", features = [ "no-entrypoint" ] }

Expand All @@ -42,3 +42,6 @@ crate-type = ["cdylib", "lib"]

[profile.release]
overflow-checks = true # Enable integer overflow checks.

[profile.test]
debug = 0 # Reduce space usage to avoid CD/CD fails when running test.
4 changes: 2 additions & 2 deletions programs/token-auth-rules/tests/buffered_rule_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ async fn buffered_rule_set() {
.instruction();

// Fail to validate Transfer operation.
let err = process_failing_validate_ix!(&mut context, validate_ix, vec![], None).await;
let err = process_failing_validate_ix!(&mut context, validate_ix, vec![], Some(300000)).await;

// Check that error is what we expect.
assert_custom_error!(err, RuleSetError::PubkeyListMatchCheckFailed);
Expand Down Expand Up @@ -145,5 +145,5 @@ async fn buffered_rule_set() {
.instruction();

// Validate Transfer operation.
process_passing_validate_ix!(&mut context, validate_ix, vec![], None).await;
process_passing_validate_ix!(&mut context, validate_ix, vec![], Some(300000)).await;
}
2 changes: 1 addition & 1 deletion programs/token-auth-rules/tests/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ macro_rules! assert_custom_error {
match $error {
solana_program_test::BanksClientError::TransactionError(
solana_sdk::transaction::TransactionError::InstructionError(
0,
_,
solana_program::instruction::InstructionError::Custom(x),
),
) => match num_traits::FromPrimitive::from_i32(x as i32) {
Expand Down

0 comments on commit fd9026d

Please sign in to comment.