Skip to content

Commit

Permalink
Merge pull request #48 from 0xKitsune/kit/0.6.0
Browse files Browse the repository at this point in the history
chore: Bump version to `0.6.0`
  • Loading branch information
0xKitsune authored Feb 12, 2025
2 parents d292de9 + bac17d0 commit a66ef27
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "uniswap_v3_math"
rust-version = "1.82"
version = "0.5.3"
version = "0.6.0"
edition = "2021"
license = "MIT"
description = "Uniswap V3 math in Rust"
Expand All @@ -12,10 +12,13 @@ keywords = ["uniswapV3", "math"]
exclude = ["target/*", ".github/*", ".gitignore", "Uniswap/*"]

[dependencies]
alloy = { version = "0.11", features = ["contract", "providers"], optional = true }
alloy = { version = "0.11", features = [
"contract",
"providers",
], optional = true }
alloy-primitives = "0.8"
eyre = "0.6"
thiserror = "2.0"

[features]
contract = ["dep:alloy"]
contract = ["dep:alloy"]
10 changes: 4 additions & 6 deletions src/tick_bitmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ mod contract {
let next = if initialized {
(compressed
- (bit_pos
.overflowing_sub(bit_math::most_significant_bit(masked)?)
.0) as i32)
.overflowing_sub(bit_math::most_significant_bit(masked)?)
.0) as i32)
* tick_spacing
} else {
(compressed - bit_pos as i32) * tick_spacing
Expand Down Expand Up @@ -112,8 +112,8 @@ mod contract {
(compressed
+ 1
+ (bit_math::least_significant_bit(masked)?
.overflowing_sub(bit_pos)
.0) as i32)
.overflowing_sub(bit_pos)
.0) as i32)
* tick_spacing
} else {
(compressed + 1 + ((0xFF - bit_pos) as i32)) * tick_spacing
Expand All @@ -124,8 +124,6 @@ mod contract {
}
}



//Flips the initialized state for a given tick from false to true, or vice versa
pub fn flip_tick(
tick_bitmap: &mut HashMap<i16, U256>,
Expand Down

0 comments on commit a66ef27

Please sign in to comment.