Skip to content

Commit 148cfd9

Browse files
committed
chore: update rust toolchain in ci
1 parent fffcd42 commit 148cfd9

File tree

9 files changed

+19
-34
lines changed

9 files changed

+19
-34
lines changed

.github/workflows/ci-fortuna.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions-rs/toolchain@v1
1515
with:
1616
profile: minimal
17-
toolchain: nightly-2023-07-23
17+
toolchain: 1.82.0
1818
override: true
1919
- name: Run executor tests
2020
run: cargo test --manifest-path ./apps/fortuna/Cargo.toml

.github/workflows/ci-hermes-server.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions-rs/toolchain@v1
1515
with:
1616
profile: minimal
17-
toolchain: nightly-2024-03-26
17+
toolchain: 1.82.0
1818
components: rustfmt, clippy
1919
override: true
2020
- name: Install protoc

.github/workflows/ci-message-buffer-idl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions-rs/toolchain@v1
2222
with:
2323
profile: minimal
24-
toolchain: nightly-2023-03-01
24+
toolchain: 1.82.0
2525
components: rustfmt, clippy
2626
- name: Install Solana
2727
run: |

.github/workflows/ci-pre-commit.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,7 @@ jobs:
2020
- uses: actions-rs/toolchain@v1
2121
with:
2222
profile: minimal
23-
toolchain: nightly-2023-03-01
24-
components: rustfmt, clippy
25-
- uses: actions-rs/toolchain@v1
26-
with:
27-
profile: minimal
28-
toolchain: nightly-2023-07-23
29-
components: rustfmt, clippy
30-
- uses: actions-rs/toolchain@v1
31-
with:
32-
profile: minimal
33-
toolchain: nightly-2024-03-26
34-
components: rustfmt, clippy
35-
- uses: actions-rs/toolchain@v1
36-
with:
37-
profile: minimal
38-
toolchain: nightly-2024-08-04
23+
toolchain: 1.82.0
3924
components: rustfmt, clippy
4025
- name: Install protoc
4126
uses: arduino/setup-protoc@v3

.github/workflows/ci-remote-executor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions-rs/toolchain@v1
1616
with:
1717
profile: minimal
18-
toolchain: 1.66.1
18+
toolchain: 1.82.0
1919
components: rustfmt, clippy
2020
override: true
2121
- name: Install Solana

.github/workflows/ci-starknet-tools.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions-rs/toolchain@v1
1515
with:
1616
profile: minimal
17-
toolchain: 1.78.0
17+
toolchain: 1.82.0
1818
components: rustfmt, clippy
1919
override: true
2020
- uses: actions/checkout@v3

.github/workflows/publish-pyth-price-store.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Install Rust
1515
uses: actions-rs/toolchain@v1
1616
with:
17-
toolchain: stable
17+
toolchain: 1.82.0
1818
default: true
1919
profile: minimal
2020
- name: Publish

.github/workflows/publish-pyth-solana-receiver-state.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
- name: Install Rust
1515
uses: actions-rs/toolchain@v1
1616
with:
17-
toolchain: stable
17+
toolchain: 1.82.0
1818
default: true
1919
profile: minimal
2020

21-
- run: cargo +stable-x86_64-unknown-linux-gnu publish --token ${CARGO_REGISTRY_TOKEN}
21+
- run: cargo publish --token ${CARGO_REGISTRY_TOKEN}
2222
env:
2323
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2424
working-directory: "target_chains/solana/pyth_solana_receiver_sdk"

target_chains/cosmwasm/contracts/pyth/src/contract.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ fn update_price_feeds(
261261
data: &[Binary],
262262
) -> StdResult<Response<MsgWrapper>> {
263263
if !is_fee_sufficient(&deps.as_ref(), info, data)? {
264-
Err(PythContractError::InsufficientFee)?;
264+
return Err(PythContractError::InsufficientFee)?;
265265
}
266266

267267
let (num_total_attestations, total_new_feeds) = apply_updates(&mut deps, &env, data)?;
@@ -308,7 +308,7 @@ fn execute_governance_instruction(
308308
// Governance messages must be applied in order. This check prevents replay attacks where
309309
// previous messages are re-applied.
310310
if vaa.sequence <= state.governance_sequence_number {
311-
Err(PythContractError::OldGovernanceMessage)?;
311+
return Err(PythContractError::OldGovernanceMessage)?;
312312
} else {
313313
updated_config.governance_sequence_number = vaa.sequence;
314314
}
@@ -320,13 +320,13 @@ fn execute_governance_instruction(
320320
// Check that the instruction is intended for this chain.
321321
// chain_id = 0 means the instruction applies to all chains
322322
if instruction.target_chain_id != state.chain_id && instruction.target_chain_id != 0 {
323-
Err(PythContractError::InvalidGovernancePayload)?;
323+
return Err(PythContractError::InvalidGovernancePayload)?;
324324
}
325325

326326
// Check that the instruction is intended for this target chain contract (as opposed to
327327
// other Pyth contracts that may live on the same chain).
328328
if instruction.module != GovernanceModule::Target {
329-
Err(PythContractError::InvalidGovernancePayload)?;
329+
return Err(PythContractError::InvalidGovernancePayload)?;
330330
}
331331

332332
let response = match instruction.action {
@@ -463,7 +463,7 @@ fn verify_vaa_from_data_source(state: &ConfigInfo, vaa: &ParsedVAA) -> StdResult
463463
chain_id: vaa.emitter_chain,
464464
};
465465
if !state.data_sources.contains(&vaa_data_source) {
466-
Err(PythContractError::InvalidUpdateEmitter)?;
466+
return Err(PythContractError::InvalidUpdateEmitter)?;
467467
}
468468
Ok(())
469469
}
@@ -475,7 +475,7 @@ fn verify_vaa_from_governance_source(state: &ConfigInfo, vaa: &ParsedVAA) -> Std
475475
chain_id: vaa.emitter_chain,
476476
};
477477
if state.governance_source != vaa_data_source {
478-
Err(PythContractError::InvalidUpdateEmitter)?;
478+
return Err(PythContractError::InvalidUpdateEmitter)?;
479479
}
480480
Ok(())
481481
}
@@ -533,7 +533,7 @@ fn parse_accumulator(deps: &Deps, env: &Env, data: &[u8]) -> StdResult<Vec<Price
533533
for update in updates {
534534
let message_vec = Vec::from(update.message);
535535
if !root.check(update.proof, &message_vec) {
536-
Err(PythContractError::InvalidMerkleProof)?;
536+
return Err(PythContractError::InvalidMerkleProof)?;
537537
}
538538

539539
let msg = from_slice::<BigEndian, Message>(&message_vec)
@@ -683,7 +683,7 @@ pub fn parse_price_feed_updates(
683683
) -> StdResult<Response<MsgWrapper>> {
684684
let _config = config_read(deps.storage).load()?;
685685
if !is_fee_sufficient(&deps.as_ref(), info, updates)? {
686-
Err(PythContractError::InsufficientFee)?;
686+
return Err(PythContractError::InsufficientFee)?;
687687
}
688688
let mut found_feeds = 0;
689689
let mut results: Vec<(Identifier, Option<PriceFeed>)> =
@@ -709,7 +709,7 @@ pub fn parse_price_feed_updates(
709709
}
710710
}
711711
if found_feeds != price_feeds.len() {
712-
Err(PythContractError::InvalidUpdatePayload)?;
712+
return Err(PythContractError::InvalidUpdatePayload)?;
713713
}
714714

715715
let _unwrapped_feeds = results
@@ -1894,7 +1894,7 @@ mod test {
18941894
})
18951895
.unwrap();
18961896

1897-
let updates = [Binary::from([1u8]), Binary::from([2u8])];
1897+
let updates = vec![Binary::from([1u8]), Binary::from([2u8])];
18981898

18991899
assert_eq!(
19001900
get_update_fee(&deps.as_ref(), &updates[0..0]),

0 commit comments

Comments
 (0)