Skip to content

Commit

Permalink
Merge pull request #429 from Phoenix-Protocol-Group/kalo/original-rew…
Browse files Browse the repository at this point in the history
…ards-impl

Stake: using tag v1.0.0 impl
  • Loading branch information
gangov authored Feb 21, 2025
2 parents 620e6b4 + 5b67e0d commit 9ce6b63
Show file tree
Hide file tree
Showing 30 changed files with 2,541 additions and 3,454 deletions.
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ target/
cobertura.xml

**/test_snapshots
.stellar/
11 changes: 0 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions contracts/pool_stable/src/tests/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ pub fn install_stake_wasm(env: &Env) -> BytesN<32> {
env.deployer().upload_contract_wasm(WASM)
}

pub fn install_stake_rewards_wasm(env: &Env) -> BytesN<32> {
soroban_sdk::contractimport!(
file = "../../target/wasm32-unknown-unknown/release/phoenix_stake_rewards.wasm"
);
env.deployer().upload_contract_wasm(WASM)
}

#[allow(clippy::too_many_arguments)]
pub fn deploy_stable_liquidity_pool_contract<'a>(
env: &Env,
Expand Down Expand Up @@ -69,7 +62,6 @@ pub fn deploy_stable_liquidity_pool_contract<'a>(

let token_wasm_hash = install_token_wasm(env);
let stake_wasm_hash = install_stake_wasm(env);
let _stake_rewards_wasm_hash = install_stake_rewards_wasm(env);

let lp_init_info = LiquidityPoolInitInfo {
admin,
Expand Down
6 changes: 1 addition & 5 deletions contracts/pool_stable/src/tests/stake_deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ extern crate std;
use phoenix::utils::{LiquidityPoolInitInfo, StakeInitInfo, TokenInitInfo};
use soroban_sdk::{testutils::Address as _, Address, Env, String};

use super::setup::{
deploy_stable_liquidity_pool_contract, deploy_token_contract, install_stake_rewards_wasm,
};
use super::setup::{deploy_stable_liquidity_pool_contract, deploy_token_contract};
use crate::contract::{StableLiquidityPool, StableLiquidityPoolClient};
use crate::tests::setup::{install_stake_wasm, install_token_wasm};
use crate::{
Expand Down Expand Up @@ -101,7 +99,6 @@ fn second_pool_stable_deployment_should_fail() {

let token_wasm_hash = install_token_wasm(&env);
let stake_wasm_hash = install_stake_wasm(&env);
let _stake_reward_wasm_hash = install_stake_rewards_wasm(&env);
let fee_recipient = user;
let max_allowed_slippage = 5_000i64; // 50% if not specified
let max_allowed_spread = 500i64; // 5% if not specified
Expand Down Expand Up @@ -178,7 +175,6 @@ fn pool_stable_initialization_should_fail_with_token_a_bigger_than_token_b() {

let token_wasm_hash = install_token_wasm(&env);
let stake_wasm_hash = install_stake_wasm(&env);
let _stake_reward_wasm_hash = install_stake_rewards_wasm(&env);
let fee_recipient = user;
let max_allowed_slippage = 5_000i64; // 50% if not specified
let max_allowed_spread = 500i64; // 5% if not specified
Expand Down
2 changes: 0 additions & 2 deletions contracts/stake/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ crate-type = ["cdylib"]

[features]
testutils = ["soroban-sdk/testutils"]
upgrade = []

[dependencies]
soroban-decimal = { workspace = true }
curve = { workspace = true }
phoenix = { workspace = true }
soroban-sdk = { workspace = true }
itoa = { version = "1.0", default-features = false }

[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }
Expand Down
1 change: 0 additions & 1 deletion contracts/stake/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ test: build

build:
$(MAKE) -C ../token build || break;
$(MAKE) -C ../stake_rewards build || break;
cargo build --target wasm32-unknown-unknown --release

lint: fmt clippy
Expand Down
Loading

0 comments on commit 9ce6b63

Please sign in to comment.