Description
packages/contracts/adapter-common/src/lib.rs has no #[cfg(test)] module at all, despite being shared scaffolding used by both blend-adapter and defindex-adapter. Every helper in it (require_not_initialized, store_vault_and_usdc, require_vault_auth, get_vault, get_usdc, get_or_not_initialized) is only ever exercised indirectly through the two adapters' own tests, which always initialize via __constructor first — so the "not yet initialized" branches are never actually hit by any test in the repo. For example, get_vault(env) returning None (the pre-init state) has zero direct coverage.
Acceptance Criteria
Description
packages/contracts/adapter-common/src/lib.rshas no#[cfg(test)]module at all, despite being shared scaffolding used by bothblend-adapteranddefindex-adapter. Every helper in it (require_not_initialized,store_vault_and_usdc,require_vault_auth,get_vault,get_usdc,get_or_not_initialized) is only ever exercised indirectly through the two adapters' own tests, which always initialize via__constructorfirst — so the "not yet initialized" branches are never actually hit by any test in the repo. For example,get_vault(env)returningNone(the pre-init state) has zero direct coverage.Acceptance Criteria
#[cfg(test)] mod testsinadapter-common/src/lib.rsassertsget_vault(&env)returnsNonebeforestore_vault_and_usdcis called, andSome(vault)after.require_not_initializedreturnsErr(AlreadyInitialized)onceVAULT_KEYis already set.cargo test -p adapter-commonruns and passes.