Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
- name: Upload WASM artifact
uses: actions/upload-artifact@v4
with:
name: nodus-amm-wasm
path: target/wasm32v1-none/release/nodus_amm.wasm
name: nodus-protocol-amm-wasm
path: target/wasm32v1-none/release/nodus_protocol_amm.wasm

test:
name: Test (unit + integration)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "nodus-amm"
name = "nodus-protocol-amm"
version = "0.1.0"
authors = ["Nodus Protocol Team"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ fi

stellar contract build

WASM="target/wasm32-unknown-unknown/release/nodus_amm.wasm"
WASM="target/wasm32-unknown-unknown/release/nodus_protocol_amm.wasm"
echo "Build complete: $WASM"
ls -lh "$WASM"
2 changes: 1 addition & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if ! command -v stellar &>/dev/null; then
exit 1
fi

WASM="target/wasm32-unknown-unknown/release/nodus_amm.wasm"
WASM="target/wasm32-unknown-unknown/release/nodus_protocol_amm.wasm"
if [ ! -f "$WASM" ]; then
echo "WASM not found. Run: make build"
exit 1
Expand Down
4 changes: 2 additions & 2 deletions tests/fuzz_tests.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#[cfg(test)]
mod fuzz_math {
use nodus_amm::math;
use nodus_protocol_amm::math;

#[test]
fn fuzz_amount_out_never_exceeds_reserve_out() {
Expand Down Expand Up @@ -66,7 +66,7 @@ mod fuzz_math {

#[test]
fn fuzz_k_invariant_holds_across_swap_sizes() {
use nodus_amm::liquidity_pool;
use nodus_protocol_amm::liquidity_pool;
let reserve = 1_000_000i128;
for amount_in in [100i128, 1_000, 5_000, 50_000, 200_000] {
let amount_out = math::get_amount_out(amount_in, reserve, reserve).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[cfg(test)]
#[cfg(feature = "testutils")]
mod integration {
use nodus_amm::{NodusAmm, NodusAmmClient};
use nodus_protocol_amm::{NodusAmm, NodusAmmClient};
use soroban_sdk::{
testutils::{Address as _, Ledger as _},
Address, Env,
Expand Down
8 changes: 4 additions & 4 deletions tests/unit_tests.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#[cfg(test)]
mod math_tests {
use nodus_amm::math;
use nodus_protocol_amm::math;

#[test]
fn get_amount_out_standard_case() {
Expand Down Expand Up @@ -67,7 +67,7 @@ mod math_tests {

#[cfg(test)]
mod liquidity_pool_tests {
use nodus_amm::liquidity_pool;
use nodus_protocol_amm::liquidity_pool;

#[test]
fn calculate_initial_liquidity_geometric_mean() {
Expand Down Expand Up @@ -101,7 +101,7 @@ mod liquidity_pool_tests {
let r0 = 100_000i128;
let r1 = 100_000i128;
let amount_in = 1_000i128;
let amount_out = nodus_amm::math::get_amount_out(amount_in, r0, r1).unwrap();
let amount_out = nodus_protocol_amm::math::get_amount_out(amount_in, r0, r1).unwrap();
let b0 = r0 + amount_in;
let b1 = r1 - amount_out;
assert!(liquidity_pool::verify_k_invariant(b0, b1, amount_in, 0, r0, r1).is_ok());
Expand All @@ -123,7 +123,7 @@ mod liquidity_pool_tests {
#[cfg(test)]
#[cfg(feature = "testutils")]
mod soroban_contract_tests {
use nodus_amm::{NodusAmm, NodusAmmClient};
use nodus_protocol_amm::{NodusAmm, NodusAmmClient};
use soroban_sdk::{
testutils::{Address as _, Ledger as _},
Address, Env,
Expand Down
Loading