Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update soroban v20.0.3 #174

Merged
merged 26 commits into from
Jan 17, 2024
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
90a1ef3
Update version soroban-sdk to v20.0.3 and updated the token contract
ueco-jb Jan 2, 2024
a791f4b
Stake: Fix clippy lints
ueco-jb Jan 2, 2024
b012433
Move Referral type to phoenix lib to try work around the cross contra…
ueco-jb Jan 3, 2024
a33fb24
Refactor pool and multihop to use the same Referral struct
ueco-jb Jan 3, 2024
4c752bc
Fix clippy lints
ueco-jb Jan 3, 2024
5d30596
bring back workspace versions in token contract
ueco-jb Jan 3, 2024
31558ae
Token: Fix clippy lints
ueco-jb Jan 3, 2024
5ad2c0b
Update CI to use the latest rust version
ueco-jb Jan 3, 2024
946ffe3
Token: Update makefile to not use soroban contract build
ueco-jb Jan 4, 2024
49464b0
Start updating pool contract to the new soroban changes...
ueco-jb Jan 5, 2024
7542afb
Pool: Update tests to new soroban specifics
ueco-jb Jan 7, 2024
bafd745
Replace deprecated Address::random with ::from_string
ueco-jb Jan 7, 2024
9942001
Replace deprecated Address::random with ::from_string part 2
ueco-jb Jan 7, 2024
3b1f727
Replace deprecated Address::random with ::from_string part 3
ueco-jb Jan 7, 2024
8daac79
Replace deprecated Address::random with ::from_string part 4
ueco-jb Jan 7, 2024
3e02d50
Replace deprecated Address::random with ::from_string part 5
ueco-jb Jan 7, 2024
b108d80
Factory: Reimplement tests to use the static contract address
ueco-jb Jan 8, 2024
3f8ac29
Revert "Move Referral type to phoenix lib to try work around the cros…
ueco-jb Jan 8, 2024
b3c2ad0
Multihop: Use proper Referral structure from pool contract
ueco-jb Jan 8, 2024
fab019c
Pool: Use internal Referral type
ueco-jb Jan 8, 2024
5c8c57a
Factory: Fix tests by hardcoding addresses and remove unnecessary tes…
ueco-jb Jan 8, 2024
d0d19c1
Stake: Replace custom addresses with generated ones to fix the trustl…
ueco-jb Jan 9, 2024
5ccd0c6
Fix clippy lints and formatting
ueco-jb Jan 9, 2024
2cf4fe2
Fix clippy lints
Jan 17, 2024
961c3e6
Add test_snapshots to gitignore
Jan 17, 2024
188c633
Token: Bring b ack lints job to makefile
Jan 17, 2024
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
Prev Previous commit
Next Next commit
Revert "Move Referral type to phoenix lib to try work around the cros…
…s contract import"

This reverts commit 78071ec.
ueco-jb authored and --global committed Jan 17, 2024
commit 3f8ac29c990a9655c0b473b00e5f6b54ff6b3303
1 change: 0 additions & 1 deletion Cargo.lock

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

1 change: 0 additions & 1 deletion contracts/multihop/Cargo.toml
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ crate-type = ["cdylib"]
testutils = ["soroban-sdk/testutils"]

[dependencies]
phoenix = { workspace = true }
soroban-sdk = { workspace = true }

[dev_dependencies]
5 changes: 2 additions & 3 deletions contracts/multihop/src/contract.rs
Original file line number Diff line number Diff line change
@@ -4,10 +4,9 @@ use soroban_sdk::{contract, contractimpl, contractmeta, vec, Address, Env, Vec};
// use crate::lp_contract::Referral;
use crate::storage::{
get_factory, is_initialized, save_factory, set_initialized, DataKey,
SimulateReverseSwapResponse, SimulateSwapResponse, Swap,
};
SimulateReverseSwapResponse, SimulateSwapResponse, Swap, Referral};
use crate::utils::{verify_reverse_swap, verify_swap};
use crate::{factory_contract, lp_contract, lp_contract::Referral};
use crate::{factory_contract, lp_contract};

// Metadata that is added on to the WASM custom section
contractmeta!(
9 changes: 9 additions & 0 deletions contracts/multihop/src/storage.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
use soroban_sdk::{contracttype, Address, Env, Vec};

#[contracttype]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Referral {
/// Address of the referral
pub address: Address,
/// fee in bps, later parsed to percentage
pub fee: i64,
}

#[contracttype]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Swap {
2 changes: 1 addition & 1 deletion contracts/pool/src/contract.rs
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ use num_integer::Roots;

use crate::contracterror::ContractError;
use crate::storage::utils::{is_initialized, set_initialized};
use crate::storage::{ComputeSwap, LiquidityPoolInfo};
use crate::storage::{ComputeSwap, LiquidityPoolInfo, Referral};
use crate::{
stake_contract,
storage::{
1 change: 0 additions & 1 deletion packages/phoenix/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![no_std]

pub mod referral;
pub mod utils;
10 changes: 0 additions & 10 deletions packages/phoenix/src/referral.rs

This file was deleted.