-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract spl-math-utils from spl-math (#7421)
* extract math-utils from spl-math * newline * replace spl-math with spl-math-utils in spl-token-swap * remove now-unused deps from spl-math * remove spl-math from stake-pool deps (it was already unused) * fix math-utils dep in spl-token-swap-fuzz * moce crate dirs * make spl-math the library crate and spl-math-example the program crate
- Loading branch information
1 parent
356ef02
commit d0f238f
Showing
16 changed files
with
68 additions
and
34 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[package] | ||
name = "spl-math-example" | ||
version = "0.1.0" | ||
description = "Solana Program Library Math Example" | ||
authors = ["Solana Labs Maintainers <[email protected]>"] | ||
repository = "https://github.com/solana-labs/solana-program-library" | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
|
||
[features] | ||
no-entrypoint = [] | ||
test-sbf = [] | ||
|
||
[dependencies] | ||
borsh = "1.5.1" | ||
num-derive = "0.4" | ||
num-traits = "0.2" | ||
solana-program = "2.1.0" | ||
spl-math = { path = "../math", version = "0.3.0" } | ||
thiserror = "1.0" | ||
|
||
[dev-dependencies] | ||
solana-program-test = "2.1.0" | ||
solana-sdk = "2.1.0" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "lib"] | ||
|
||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Math | ||
|
||
Program wrapper around the spl-math-utils crate. The program exists for testing purposes. | ||
|
||
## Audit | ||
|
||
The repository [README](https://github.com/solana-labs/solana-program-library#audits) | ||
contains information about program audits. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//! Math operations using unsigned integers | ||
#![deny(missing_docs)] | ||
#![forbid(unsafe_code)] | ||
|
||
mod entrypoint; | ||
pub mod error; | ||
pub mod instruction; | ||
pub mod processor; | ||
|
||
pub use spl_math::{approximations, checked_ceil_div, precise_number, uint}; | ||
|
||
solana_program::declare_id!("Math111111111111111111111111111111111111111"); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
//! Math operations using unsigned integers | ||
#![deny(missing_docs)] | ||
#![forbid(unsafe_code)] | ||
//! Math utilities. | ||
pub mod approximations; | ||
pub mod checked_ceil_div; | ||
mod entrypoint; | ||
pub mod error; | ||
pub mod instruction; | ||
pub mod precise_number; | ||
pub mod processor; | ||
pub mod uint; | ||
|
||
solana_program::declare_id!("Math111111111111111111111111111111111111111"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters