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

Mtg 419 update mpl token auth rules to the recent 1.18 solana #153

Closed
wants to merge 7 commits into from
Closed
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
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
15 changes: 10 additions & 5 deletions programs/token-auth-rules/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ 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"
solana-program = "1.18.9"
solana-zk-token-sdk = "1.18.9"
thiserror = "1.0"

[features]
Expand All @@ -31,9 +33,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 +44,6 @@ crate-type = ["cdylib", "lib"]

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

[profile.test]
debug = 0
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
Loading