soroswap-library

Crates.iosoroswap-library
lib.rssoroswap-library
version2.0.0
created_at2023-10-13 21:10:18.115021+00
updated_at2024-12-18 17:42:58.739325+00
descriptionLibrary that enables efficient and optimized code execution across different contracts on the Soroswap.Finance protocol
homepagehttps://github.com/soroswap/core/tree/main/contracts/library
repositoryhttps://github.com/soroswap/core/tree/main/contracts/library
max_upload_size
id1002648
size74,024
Esteban Iglesias (esteblock)

documentation

README

The Soroswap Library

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

Usage as a crate

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)

How to publish:

https://doc.rust-lang.org/cargo/reference/publishing.html

cargo login
cargo publish --dry-run
cargo publish

Examples

Acknowledgements

This library was inspired by the UniswapV2Library: https://github.com/Uniswap/v2-periphery/blob/master/contracts/libraries/UniswapV2Library.sol

WASM

The WASM target wasm32-unknown-unknown is supported.

Contributions

Contributions are welcome

Licence

This library is released under the GPL-3.0 License.

Commit count: 1326

cargo fmt