Skip to content

Commit

Permalink
feat: update workflow and fix warning (OpenZeppelin#1066)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericnordelo authored Jul 26, 2024
1 parent fa708bd commit 49816b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ jobs:
run: |
CURRENT_VERSION=$(grep '^version = ' Scarb.toml | sed 's/version = "\(.*\)"/\1/')
SCARB_VERSION=$(grep 'scarb-version = ' Scarb.toml | sed 's/scarb-version = "\(.*\)"/\1/')
CAIRO_VERSION=$(grep 'cairo-version = ' Scarb.toml | sed 's/cairo-version = "\(.*\)"/\1/')
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
echo "SCARB_VERSION=$SCARB_VERSION" >> $GITHUB_ENV
echo "CAIRO_VERSION=$CAIRO_VERSION" >> $GITHUB_ENV
- name: Extract new version number
run: echo "NEW_VERSION=${GITHUB_REF#refs/heads/release-v}" >> $GITHUB_ENV
Expand All @@ -43,7 +45,7 @@ jobs:

- name: Update presets page
run: |
class_hash get --json | sed -e '1,4d' | python3 scripts/get_hashes_page.py $SCARB_VERSION \
class_hash get --json | sed -e '1,4d' | python3 scripts/get_hashes_page.py $CAIRO_VERSION \
> ./docs/modules/ROOT/pages/utils/_class_hashes.adoc
- name: Auto-commit changes
Expand Down
4 changes: 2 additions & 2 deletions src/utils/structs/checkpoint.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts for Cairo v0.15.0-rc.0 (utils/structs/checkpoint.cairo)

use core::integer::u32_sqrt;
use core::num::traits::Sqrt;
use openzeppelin::utils::math;
use starknet::storage_access::StorePacking;
use super::storage_array::{StorageArray, StorageArrayTrait};
Expand Down Expand Up @@ -55,7 +55,7 @@ pub impl TraceImpl of TraceTrait {
let mut high = len;

if (len > 5) {
let mid = len - u32_sqrt(len).into();
let mid = len - len.sqrt().into();
if (key < checkpoints.read_at(mid).key) {
high = mid;
} else {
Expand Down

0 comments on commit 49816b6

Please sign in to comment.