Skip to content

Commit

Permalink
Merge branch 'master' into bump-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger authored Oct 3, 2024
2 parents 1f802c3 + 1b1071e commit 387d01d
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: "Set allowed lints"
run: |
if [ "${{ matrix.toolchain }}" == "nightly" ]; then
echo "ALLOWED=-A non_local_definitions -A clippy::too_long_first_doc_paragraph" >> $GITHUB_ENV
echo "ALLOWED=-A non_local_definitions -A clippy::too_long_first_doc_paragraph -A clippy::needless_return" >> $GITHUB_ENV
else
echo "ALLOWED=" >> $GITHUB_ENV
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-12]
os: [ubuntu-latest, macos-13, macos-14]
toolchain: [stable, nightly]

steps:
Expand Down
7 changes: 6 additions & 1 deletion scripts/run_bench_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,10 @@ benches=(
)

for bench in ${benches[@]}; do
$RUNTIME run --dir=. $REPO_ROOT/target/bench-wasm/$bench.wasm -- --bench
if [[ "$RUNTIME" == "wasmtime" ]]; then
# https://github.com/bytecodealliance/wasmtime/issues/7384
$RUNTIME run --dir=. -- $REPO_ROOT/target/bench-wasm/$bench.wasm --bench
else
$RUNTIME run --dir=. $REPO_ROOT/target/bench-wasm/$bench.wasm -- --bench
fi
done
4 changes: 2 additions & 2 deletions starknet-accounts/src/account/declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ where
let gas_price =
u64::from_le_bytes(gas_price_bytes[..8].try_into().unwrap());

(((overall_fee + gas_price - 1) / gas_price) as f64
* self.gas_estimate_multiplier) as u64
(overall_fee.div_ceil(gas_price) as f64 * self.gas_estimate_multiplier)
as u64
}
};

Expand Down
4 changes: 2 additions & 2 deletions starknet-accounts/src/account/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ where
let gas_price =
u64::from_le_bytes(gas_price_bytes[..8].try_into().unwrap());

((((overall_fee + gas_price - 1) / gas_price) as f64)
* self.gas_estimate_multiplier) as u64
((overall_fee.div_ceil(gas_price) as f64) * self.gas_estimate_multiplier)
as u64
}
};

Expand Down
4 changes: 2 additions & 2 deletions starknet-accounts/src/factory/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,8 +694,8 @@ where
let gas_price =
u64::from_le_bytes(gas_price_bytes[..8].try_into().unwrap());

((((overall_fee + gas_price - 1) / gas_price) as f64)
* self.gas_estimate_multiplier) as u64
((overall_fee.div_ceil(gas_price) as f64) * self.gas_estimate_multiplier)
as u64
}
};

Expand Down
4 changes: 2 additions & 2 deletions starknet-accounts/tests/single_owner_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ async fn can_execute_eth_transfer_invoke_v3_inner<P: Provider + Send + Sync>(
calldata: vec![Felt::from_hex("0x1234").unwrap(), Felt::ONE, Felt::ZERO],
}])
.gas(100000)
.gas_price(800000000000000)
.gas_price(900000000000000)
.send()
.await
.unwrap();
Expand Down Expand Up @@ -545,7 +545,7 @@ async fn can_declare_cairo1_contract_v3_inner<P: Provider + Send + Sync>(
Felt::from_hex(&hashes.compiled_class_hash).unwrap(),
)
.gas(100000)
.gas_price(800000000000000)
.gas_price(900000000000000)
.send()
.await
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion starknet-contract/tests/contract_deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async fn can_deploy_contract_to_alpha_sepolia_with_invoke_v3() {
let result = factory
.deploy_v3(vec![Felt::ONE], Felt::from_bytes_be(&salt_buffer), true)
.gas(100000)
.gas_price(800000000000000)
.gas_price(900000000000000)
.send()
.await;

Expand Down

0 comments on commit 387d01d

Please sign in to comment.