Crates.io | soroswap-library |
lib.rs | soroswap-library |
version | 1.0.21 |
source | src |
created_at | 2023-10-13 21:10:18.115021 |
updated_at | 2024-07-25 11:23:46.31253 |
description | Library that enables efficient and optimized code execution across different contracts on the Soroswap.Finance protocol |
homepage | https://github.com/soroswap/core/tree/main/contracts/library |
repository | https://github.com/soroswap/core/tree/main/contracts/library |
max_upload_size | |
id | 1002648 |
size | 70,317 |
Library that enables efficient and optimized code execution across different contracts on the Soroswap.Finance protocol.
This can be used as a Library Contract that can be deployed in the Soroban Blockchain or as a crate in your contract
Check https://crates.io/crates/soroswap-library
1.- Add this to your Cargo.toml:
[dependencies]
soroswap-library = "
2.- Import it:
use soroswap_library;
3.- Use it:
let quote = soroswap_library::quote(amount_a, reserve_a, reserve_b)
https://doc.rust-lang.org/cargo/reference/publishing.html
cargo login
cargo publish --dry-run
cargo publish
This library was inspired by the UniswapV2Library: https://github.com/Uniswap/v2-periphery/blob/master/contracts/libraries/UniswapV2Library.sol
The WASM target wasm32-unknown-unknown is supported.
Contributions are welcome
This library is released under the GPL-3.0 License.