Docs.rs
tulipv2-sdk-common-0.9.22
tulipv2-sdk-common 0.9.22
Permalink
Docs.rs crate page
MIT
/
Apache-2.0
Links
crates.io
Source
Owners
bonedaddy
Dependencies
anchor-lang ^0.24.2
normal
anchor-spl ^0.24.2
normal
arrayref ^0.3.6
normal
bytemuck ^1.7.2
normal
num-derive ^0.3
normal
num-traits ^0.2
normal
sighashdb ^0.1.37
normal
so-defi-utils ^0.1.0
normal
solana-program ^1.9.13
normal
spl-associated-token-account ^1.0.3
normal
spl-token ^3.2.0
normal
static-pubkey ^1.0.2
normal
thiserror ^1.0
normal
tulip-arrform ^0.1.1
normal
tulipv2-sdk-farms ^0.9.21
normal
uint ^0.8
normal
anchor-client ^0.24.2
dev
Versions
29.04%
of the crate is documented
Platform
i686-pc-windows-msvc
i686-unknown-linux-gnu
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
☰
Module common
Constants
Traits
?
Module
tulipv2_sdk_common
::
math
::
common
source
·
[
−
]
Expand description
Common module for Decimal and Rate
Constants
HALF_WAD
Half of identity
PERCENT_SCALER
Scale for percentages
SCALE
Scale of precision
WAD
Identity
Traits
TryAdd
Try to subtract, return an error on overflow
TryDiv
Try to divide, return an error on overflow or divide by zero
TryMul
Try to multiply, return an error on overflow
TrySub
Try to subtract, return an error on underflow