I want to use U256 in ink! but I've got some a error although I imported primitive_types/std.... how can I solve it?
use primitive_types::U256;
pub mod liquidity_num {
pub const MIN_TICK: i32 = -887272;
pub const MAX_TICK: i32 = -MIN_TICK;
pub const MIN_SQRT_RATIO: u128 = 4295128739;
pub const MAX_SQRT_RATIO: U256 = U256::from(1461446703485210103287273052203988822378723970342);
}
error
error: integer literal is too large
--> uniswap-v3/logics/helpers/liquidity_helper.rs:13:49
|
13 | pub const MAX_SQRT_RATIO: U256 = U256::from(1461446703485210103287273052203988822378723970342);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0412]: cannot find type `U256` in this scope
--> uniswap-v3/logics/helpers/liquidity_helper.rs:13:31
|
13 | pub const MAX_SQRT_RATIO: U256 = U256::from(1461446703485210103287273052203988822378723970342);
| ^^^^ not found in this scope
|
help: consider importing one of these items
|
10 | use crate::helpers::liquidity_helper::U256;
|
10 | use primitive_types::U256;
|
error[E0433]: failed to resolve: use of undeclared type `U256`
--> uniswap-v3/logics/helpers/liquidity_helper.rs:13:38
|
13 | pub const MAX_SQRT_RATIO: U256 = U256::from(1461446703485210103287273052203988822378723970342);
| ^^^^ not found in this scope
|
help: consider importing one of these items
|
10 | use crate::helpers::liquidity_helper::U256;
|
10 | use primitive_types::U256;
|