@@ -280,8 +280,11 @@ TEST_CASE_VERSIONS("Trustline stellar asset contract",
280280 REQUIRE (!client.transfer (acc, acc2Addr, 10 ));
281281
282282 // Now transfer from a contract
283- TestContract& transferContract = test.deployWasmContract (
284- rust_bridge::get_test_contract_sac_transfer ());
283+ TestContract& transferContract =
284+ test.deployWasmContract (rust_bridge::get_test_contract_sac_transfer (
285+ app.getLedgerManager ()
286+ .getLastClosedLedgerHeader ()
287+ .header .ledgerVersion ));
285288
286289 REQUIRE (client.mint (issuer, transferContract.getAddress (), 10 ));
287290
@@ -372,7 +375,8 @@ TEST_CASE("Native stellar asset contract",
372375 // Now test xlm transfer from a contract to another contract and then to an
373376 // account.
374377 TestContract& transferContract =
375- test.deployWasmContract (rust_bridge::get_test_contract_sac_transfer ());
378+ test.deployWasmContract (rust_bridge::get_test_contract_sac_transfer (
379+ app.getConfig ().LEDGER_PROTOCOL_VERSION ));
376380
377381 REQUIRE (client.transfer (a1, transferContract.getAddress (), 10 ));
378382
@@ -421,7 +425,8 @@ TEST_CASE("Native stellar asset contract",
421425 checkSponsorship (ltx, root.getPublicKey (), 0 , nullptr , 0 , 2 , 2 , 0 );
422426 }
423427
424- // Test batch_transfer with 5 destinations
428+ // Test batch_transfer with 5 destinations (protocol 23+)
429+ if (app.getConfig ().LEDGER_PROTOCOL_VERSION >= 23 )
425430 {
426431 auto batchDest1 = root.create (" batchDest1" , minBalance);
427432 auto batchDest2 = root.create (" batchDest2" , minBalance);
@@ -497,7 +502,8 @@ TEST_CASE("Stellar asset contract transfer with CAP-67 address types",
497502 auto a1Address = makeAccountAddress (a1.getPublicKey ());
498503 auto a2Address = makeAccountAddress (a2.getPublicKey ());
499504 TestContract& transferContract =
500- test.deployWasmContract (rust_bridge::get_test_contract_sac_transfer ());
505+ test.deployWasmContract (rust_bridge::get_test_contract_sac_transfer (
506+ test.getApp ().getConfig ().LEDGER_PROTOCOL_VERSION ));
501507
502508 auto runTest = [&](bool useNativeAsset) {
503509 Asset tokenAsset = useNativeAsset ? txtest::makeNativeAsset () : asset;
0 commit comments