Description:
The invoice_liquidity contract exposes a get_version() view function (at lib.rs:205-207) that returns the contract version string (currently "1.0.0" from constants.rs). However, the SDK does not expose this method, making it impossible for frontend applications to display or check the deployed contract version.
The contract implementation is straightforward:
pub fn get_version(env: Env) -> soroban_sdk::String {
soroban_sdk::String::from_str(&env, crate::constants::CONTRACT_VERSION)
}
The SDK method should:
- Call the contract's
get_version view function
- Return the version string
- Handle the case where the contract is not deployed (return null or throw)
Why it matters: Version checking is essential for frontend compatibility. When the contract is upgraded, frontends need to verify they're interacting with the expected version.
Acceptance Criteria:
Relevant Files: contracts/invoice_liquidity/src/lib.rs:205-207, contracts/invoice_liquidity/src/constants.rs:5, sdk/src/index.ts
Description:
The
invoice_liquiditycontract exposes aget_version()view function (atlib.rs:205-207) that returns the contract version string (currently"1.0.0"fromconstants.rs). However, the SDK does not expose this method, making it impossible for frontend applications to display or check the deployed contract version.The contract implementation is straightforward:
The SDK method should:
get_versionview functionWhy it matters: Version checking is essential for frontend compatibility. When the contract is upgraded, frontends need to verify they're interacting with the expected version.
Acceptance Criteria:
sdk/src/methods/version.tswith agetVersion(client: ILNClient)functionPromise<string>sdk/src/methods/version.test.tsusing mock clientsdk/src/index.tsRelevant Files:
contracts/invoice_liquidity/src/lib.rs:205-207,contracts/invoice_liquidity/src/constants.rs:5,sdk/src/index.ts