diff --git a/Makefile b/Makefile
index 3db46a6d..d5dff3be 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-SUBDIRS := contracts/token contracts/collections contracts/deployer contracts/auctions
+SUBDIRS := contracts/token contracts/collections contracts/deployer
BUILD_FLAGS ?=
default: build
diff --git a/contracts/collections/src/contract.rs b/contracts/collections/src/contract.rs
index 72249074..6d0ccb9e 100644
--- a/contracts/collections/src/contract.rs
+++ b/contracts/collections/src/contract.rs
@@ -589,7 +589,6 @@ impl Collections {
}
#[allow(dead_code)]
- #[cfg(not(tarpaulin_include))]
pub fn upgrade(env: Env, new_wasm_hash: BytesN<32>) -> Result<(), ContractError> {
let admin: Address = get_admin(&env)?;
admin.require_auth();
@@ -599,14 +598,11 @@ impl Collections {
Ok(())
}
- #[cfg(test)]
- #[allow(dead_code)]
pub fn show_admin(env: &Env) -> Result
{
let maybe_admin = crate::storage::utils::get_admin(env)?;
Ok(maybe_admin)
}
- #[cfg(test)]
- #[allow(dead_code)]
+
pub fn show_config(env: &Env) -> Result {
let mabye_config = crate::storage::utils::get_config(env)?;
Ok(mabye_config)
diff --git a/contracts/collections/src/storage.rs b/contracts/collections/src/storage.rs
index fbc457a4..a3e23c2e 100644
--- a/contracts/collections/src/storage.rs
+++ b/contracts/collections/src/storage.rs
@@ -104,7 +104,6 @@ pub mod utils {
}
#[allow(dead_code)]
- #[cfg(not(tarpaulin_include))]
pub fn get_config(env: &Env) -> Result {
let config = env
.storage()
@@ -121,7 +120,6 @@ pub mod utils {
Ok(())
}
- #[cfg(not(tarpaulin_include))]
pub fn get_admin(env: &Env) -> Result {
let admin = env
.storage()
diff --git a/contracts/collections/src/test/setup.rs b/contracts/collections/src/test/setup.rs
index 3cbb097a..c701fcb9 100644
--- a/contracts/collections/src/test/setup.rs
+++ b/contracts/collections/src/test/setup.rs
@@ -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_contract(None, Collections {}));
+ let collections = CollectionsClient::new(env, &env.register(Collections, ()));
let alt_admin = &Address::generate(env);
let alt_name = &String::from_str(env, "Stellar kitties");
diff --git a/contracts/collections/src/test/tests.rs b/contracts/collections/src/test/tests.rs
index c12e5b26..40bc973d 100644
--- a/contracts/collections/src/test/tests.rs
+++ b/contracts/collections/src/test/tests.rs
@@ -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_contract(None, Collections {}));
+ let collections = CollectionsClient::new(&env, &env.register(Collections, ()));
collections.initialize(&admin, name, symbol);
diff --git a/contracts/deployer/src/lib.rs b/contracts/deployer/src/lib.rs
index 70dd4c65..ab9d07ae 100644
--- a/contracts/deployer/src/lib.rs
+++ b/contracts/deployer/src/lib.rs
@@ -1,8 +1,8 @@
#![no_std]
use soroban_sdk::{
- contract, contracterror, contractimpl, contractmeta, contracttype, log, vec, Address, BytesN,
- Env, IntoVal, String, Symbol, Val, Vec,
+ contract, contractimpl, contractmeta, contracttype, log, vec, Address, BytesN, Env, IntoVal,
+ String, Symbol, Val, Vec,
};
// Values used to extend the TTL of storage
@@ -51,7 +51,7 @@ impl CollectionsDeployer {
let deployed_collection = env
.deployer()
.with_address(admin.clone(), salt)
- .deploy(collections_wasm_hash);
+ .deploy_v2(collections_wasm_hash, ());
let init_fn = Symbol::new(&env, "initialize");
let init_fn_args: Vec = vec![
diff --git a/contracts/deployer/src/tests.rs b/contracts/deployer/src/tests.rs
index 2ca64405..8e72ba34 100644
--- a/contracts/deployer/src/tests.rs
+++ b/contracts/deployer/src/tests.rs
@@ -16,8 +16,7 @@ mod collections {
#[test]
fn test_deploy_collection_from_contract() {
let env = Env::default();
- let client =
- CollectionsDeployerClient::new(&env, &env.register_contract(None, CollectionsDeployer));
+ let client = CollectionsDeployerClient::new(&env, &env.register(CollectionsDeployer, ()));
// Upload the Wasm to be deployed from the deployer contract.
// This can also be called from within a contract if needed.
@@ -47,8 +46,7 @@ fn test_deploy_multiple_collections() {
let env = Env::default();
env.mock_all_auths();
- let client =
- CollectionsDeployerClient::new(&env, &env.register_contract(None, CollectionsDeployer));
+ let client = CollectionsDeployerClient::new(&env, &env.register(CollectionsDeployer, ()));
// Upload the Wasm to be deployed from the deployer contract.
// This can also be called from within a contract if needed.
@@ -134,7 +132,7 @@ fn test_deploy_multiple_collections() {
fn initialize_twice() {
let env = Env::default();
let deployer_client =
- CollectionsDeployerClient::new(&env, &env.register_contract(None, CollectionsDeployer));
+ CollectionsDeployerClient::new(&env, &env.register(CollectionsDeployer, ()));
let wasm_hash = env.deployer().upload_contract_wasm(collections::WASM);
deployer_client.initialize(&wasm_hash);