Skip to content

Commit a8c2f1b

Browse files
authored
Merge pull request #461 from Phoenix-Protocol-Group/phoenix-v2-upgrade
To tidy up the update script
2 parents 3757d2c + f92a961 commit a8c2f1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2048
-2895
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to
77

88
## [Unreleased]
99

10+
## [2.0.0] - 2025-06-07
11+
1012
## Changed
1113

1214
- All: Updates the soroban SDK to latest stable version 22 ([#411])
@@ -34,6 +36,7 @@ and this project adheres to
3436
- All: Adds a mechanism to change the admin of a contract that ensures safety of transition ([#448])
3537
- All: Adds constructors instead of using `initialize` (#[455])
3638
- Factory, Trader, Vesting: adds `update_config` ([#457])
39+
- Set phoenix version v2.0.0 ([#461])
3740

3841
## Fixed
3942

@@ -66,6 +69,7 @@ and this project adheres to
6669
[#455]: https://github.com/Phoenix-Protocol-Group/phoenix-contracts/pull/455
6770
[#457]: https://github.com/Phoenix-Protocol-Group/phoenix-contracts/pull/457
6871
[#458]: https://github.com/Phoenix-Protocol-Group/phoenix-contracts/pull/458
72+
[#461]: https://github.com/Phoenix-Protocol-Group/phoenix-contracts/pull/461
6973

7074
## [1.1.0] - 2024-08-27
7175

Cargo.lock

Lines changed: 12 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["contracts/*", "packages/*"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "1.1.0"
6+
version = "2.0.0"
77
edition = "2021"
88
license = "GPL-3.0"
99
repository = "https://github.com/Phoenix-Protocol-Group/phoenix-contracts"
@@ -20,6 +20,12 @@ soroban-token-sdk = "22.0.7"
2020
test-case = "3.3"
2121
pretty_assertions = "1.4.0"
2222

23+
[workspace.lints.clippy]
24+
too_many_arguments = "allow"
25+
26+
[workspace.lints.rust]
27+
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(tarpaulin_include)"] }
28+
2329
[profile.release]
2430
opt-level = "z"
2531
overflow-checks = true

contracts/factory/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ crate-type = ["cdylib"]
1313
testutils = ["soroban-sdk/testutils"]
1414
upgrade = []
1515

16+
[lints]
17+
workspace = true
18+
1619
[dependencies]
1720
soroban-sdk = { workspace = true }
1821
phoenix = { workspace = true }
1922

20-
[lints.rust]
21-
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(tarpaulin_include)"] }
22-
2323
[dev-dependencies]
2424
soroban-sdk = { workspace = true, features = ["testutils"] }
2525
test-case = { workspace = true }

contracts/factory/src/contract.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ pub struct Factory;
3131

3232
#[allow(dead_code)]
3333
pub trait FactoryTrait {
34-
#[allow(clippy::too_many_arguments)]
3534
fn create_liquidity_pool(
3635
env: Env,
3736
sender: Address,
@@ -84,7 +83,6 @@ pub trait FactoryTrait {
8483

8584
#[contractimpl]
8685
impl FactoryTrait for Factory {
87-
#[allow(clippy::too_many_arguments)]
8886
fn create_liquidity_pool(
8987
env: Env,
9088
sender: Address,
@@ -182,7 +180,6 @@ impl FactoryTrait for Factory {
182180
lp_contract_address
183181
}
184182

185-
#[allow(clippy::too_many_arguments)]
186183
fn update_config(
187184
env: Env,
188185
multihop_address: Option<Address>,
@@ -543,7 +540,6 @@ impl FactoryTrait for Factory {
543540

544541
#[contractimpl]
545542
impl Factory {
546-
#[allow(clippy::too_many_arguments)]
547543
pub fn __constructor(
548544
env: Env,
549545
admin: Address,

contracts/factory/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pub mod token_contract {
1616
);
1717
}
1818

19-
#[allow(clippy::too_many_arguments)]
2019
pub mod stake_contract {
2120
soroban_sdk::contractimport!(
2221
file = "../../target/wasm32-unknown-unknown/release/phoenix_stake.wasm"

contracts/factory/src/tests/setup.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,70 +10,60 @@ pub const ONE_DAY: u64 = 86400;
1010
const TOKEN_WASM: &[u8] =
1111
include_bytes!("../../../../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm");
1212

13-
#[allow(clippy::too_many_arguments)]
1413
#[cfg(feature = "upgrade")]
1514
pub mod old_factory {
1615
soroban_sdk::contractimport!(file = "../../.wasm_binaries_mainnet/live_factory.wasm");
1716
}
1817

19-
#[allow(clippy::too_many_arguments)]
2018
#[cfg(feature = "upgrade")]
2119
pub fn install_old_multihop_wasm(env: &Env) -> BytesN<32> {
2220
soroban_sdk::contractimport!(file = "../../.wasm_binaries_mainnet/live_multihop.wasm");
2321
env.deployer().upload_contract_wasm(WASM)
2422
}
2523

26-
#[allow(clippy::too_many_arguments)]
2724
#[cfg(feature = "upgrade")]
2825
pub fn install_old_token_wasm(env: &Env) -> BytesN<32> {
2926
soroban_sdk::contractimport!(file = "../../.wasm_binaries_mainnet/live_token_contract.wasm");
3027
env.deployer().upload_contract_wasm(WASM)
3128
}
3229

33-
#[allow(clippy::too_many_arguments)]
3430
#[cfg(feature = "upgrade")]
3531
pub fn old_lp_wasm(env: &Env) -> BytesN<32> {
3632
soroban_sdk::contractimport!(file = "../../.wasm_binaries_mainnet/live_pho_usdc_pool.wasm");
3733
env.deployer().upload_contract_wasm(WASM)
3834
}
3935

40-
#[allow(clippy::too_many_arguments)]
4136
#[cfg(feature = "upgrade")]
4237
pub fn old_stake_wasm(env: &Env) -> BytesN<32> {
4338
soroban_sdk::contractimport!(file = "../../.wasm_binaries_mainnet/live_pho_usdc_stake.wasm");
4439
env.deployer().upload_contract_wasm(WASM)
4540
}
4641

47-
#[allow(clippy::too_many_arguments)]
4842
pub(crate) fn install_latest_factory(env: &Env) -> BytesN<32> {
4943
soroban_sdk::contractimport!(
5044
file = "../../target/wasm32-unknown-unknown/release/phoenix_factory.wasm"
5145
);
5246
env.deployer().upload_contract_wasm(WASM)
5347
}
5448

55-
#[allow(clippy::too_many_arguments)]
5649
pub mod lp_contract {
5750
soroban_sdk::contractimport!(
5851
file = "../../target/wasm32-unknown-unknown/release/phoenix_pool.wasm"
5952
);
6053
}
6154

62-
#[allow(clippy::too_many_arguments)]
6355
pub mod stable_lp {
6456
soroban_sdk::contractimport!(
6557
file = "../../target/wasm32-unknown-unknown/release/phoenix_pool_stable.wasm"
6658
);
6759
}
6860

69-
#[allow(clippy::too_many_arguments)]
7061
pub mod stake_contract {
7162
soroban_sdk::contractimport!(
7263
file = "../../target/wasm32-unknown-unknown/release/phoenix_stake.wasm"
7364
);
7465
}
7566

76-
#[allow(clippy::too_many_arguments)]
7767
pub fn install_multihop_wasm(env: &Env) -> BytesN<32> {
7868
soroban_sdk::contractimport!(
7969
file = "../../target/wasm32-unknown-unknown/release/phoenix_multihop.wasm"
@@ -93,7 +83,6 @@ pub fn install_token_wasm(env: &Env) -> BytesN<32> {
9383
env.deployer().upload_contract_wasm(token_contract::WASM)
9484
}
9585

96-
#[allow(clippy::too_many_arguments)]
9786
pub fn install_stake_wasm(env: &Env) -> BytesN<32> {
9887
soroban_sdk::contractimport!(
9988
file = "../../target/wasm32-unknown-unknown/release/phoenix_stake.wasm"

contracts/multihop/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ crate-type = ["cdylib"]
1313
testutils = ["soroban-sdk/testutils"]
1414
upgrade = []
1515

16+
[lints]
17+
workspace = true
18+
1619
[dependencies]
1720
soroban-sdk = { workspace = true }
1821
phoenix = { workspace = true }
1922

20-
[lints.rust]
21-
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(tarpaulin_include)"] }
22-
2323
[dev-dependencies]
2424
soroban-sdk = { workspace = true, features = ["testutils"] }

contracts/multihop/src/contract.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ pub struct Multihop;
2929

3030
#[allow(dead_code)]
3131
pub trait MultihopTrait {
32-
#[allow(clippy::too_many_arguments)]
3332
fn swap(
3433
env: Env,
3534
recipient: Address,
@@ -74,7 +73,6 @@ pub trait MultihopTrait {
7473

7574
#[contractimpl]
7675
impl MultihopTrait for Multihop {
77-
#[allow(clippy::too_many_arguments)]
7876
fn swap(
7977
env: Env,
8078
recipient: Address,

contracts/multihop/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ mod error;
44
mod storage;
55
mod utils;
66

7-
#[allow(clippy::too_many_arguments)]
87
pub mod xyk_pool {
98
// The import will code generate:
109
// - A ContractClient type that can be used to invoke functions on the contract.
@@ -14,14 +13,12 @@ pub mod xyk_pool {
1413
);
1514
}
1615

17-
#[allow(clippy::too_many_arguments)]
1816
pub mod stable_pool {
1917
soroban_sdk::contractimport!(
2018
file = "../../target/wasm32-unknown-unknown/release/phoenix_pool_stable.wasm"
2119
);
2220
}
2321

24-
#[allow(clippy::too_many_arguments)]
2522
pub mod factory_contract {
2623
soroban_sdk::contractimport!(
2724
file = "../../target/wasm32-unknown-unknown/release/phoenix_factory.wasm"

0 commit comments

Comments
 (0)