Skip to content

Commit

Permalink
Merge pull request #29 from Phoenix-Protocol-Group/soroban-sdk-upgrad…
Browse files Browse the repository at this point in the history
…e-v2

changes back to latest stable version of soroban-sdk
  • Loading branch information
ueco-jb authored Nov 22, 2024
2 parents 710043f + 9d4e647 commit e840074
Show file tree
Hide file tree
Showing 11 changed files with 579 additions and 770 deletions.
398 changes: 133 additions & 265 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ ed25519-dalek = "1.0.1"
num-integer = { version = "0.1.45", default-features = false, features = [
"i128",
] }
soroban-sdk = "22.0.0-rc.3.1"
soroban-auth = "22.0.0-rc.3.1"
soroban-token-sdk = "22.0.0-rc.3.1"
soroban-sdk = "21.7.7"
soroban-auth = "21.7.7"
soroban-token-sdk = "21.7.7"
test-case = "3.3"

[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion contracts/collections/src/test/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub fn initialize_collection_contract<'a>(
name: Option<&String>,
symbol: Option<&String>,
) -> CollectionsClient<'a> {
let collections = CollectionsClient::new(env, &env.register(Collections, ()));
let collections = CollectionsClient::new(env, &env.register_contract(None, Collections {}));

let alt_admin = &Address::generate(env);
let alt_name = &String::from_str(env, "Stellar kitties");
Expand Down
2 changes: 1 addition & 1 deletion contracts/collections/src/test/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn initialization_should_fail_when_done_twice() {
let name = &String::from_str(&env, "Stellar kitties");
let symbol = &String::from_str(&env, "STK");

let collections = CollectionsClient::new(&env, &env.register(Collections, ()));
let collections = CollectionsClient::new(&env, &env.register_contract(None, Collections {}));

collections.initialize(&admin, name, symbol);

Expand Down
2 changes: 1 addition & 1 deletion contracts/deployer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl CollectionsDeployer {
let deployed_collection = env
.deployer()
.with_address(admin.clone(), salt)
.deploy_v2(collections_wasm_hash, ());
.deploy(collections_wasm_hash);

let init_fn = Symbol::new(&env, "initialize");
let init_fn_args: Vec<Val> = vec![
Expand Down
8 changes: 5 additions & 3 deletions contracts/deployer/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ mod collections {
#[test]
fn test_deploy_collection_from_contract() {
let env = Env::default();
let client = CollectionsDeployerClient::new(&env, &env.register(CollectionsDeployer, ()));
let client =
CollectionsDeployerClient::new(&env, &env.register_contract(None, CollectionsDeployer));

// Upload the Wasm to be deployed from the deployer contract.
// This can also be called from within a contract if needed.
Expand Down Expand Up @@ -46,7 +47,8 @@ fn test_deploy_multiple_collections() {
let env = Env::default();
env.mock_all_auths();

let client = CollectionsDeployerClient::new(&env, &env.register(CollectionsDeployer, ()));
let client =
CollectionsDeployerClient::new(&env, &env.register_contract(None, CollectionsDeployer));

// Upload the Wasm to be deployed from the deployer contract.
// This can also be called from within a contract if needed.
Expand Down Expand Up @@ -132,7 +134,7 @@ fn test_deploy_multiple_collections() {
fn initialize_twice() {
let env = Env::default();
let deployer_client =
CollectionsDeployerClient::new(&env, &env.register(CollectionsDeployer, ()));
CollectionsDeployerClient::new(&env, &env.register_contract(None, CollectionsDeployer));

let wasm_hash = env.deployer().upload_contract_wasm(collections::WASM);
deployer_client.initialize(&wasm_hash);
Expand Down
Loading

0 comments on commit e840074

Please sign in to comment.