Repository: hiero-ledger/hiero-consensus-node
Pull request #19147: chore: Decouple `hapiTestCrypto` from shard/realm
Author: login: mhess-swl
Labels: name: Test Development
description: Test Development
Created: 2025-05-11T08:03:28Z | Merged: 2025-05-19T17:42:50Z

**Description**:

Removes explicit mention of "0" for either shard or realm in the tests that run as part of the `hapiTestCrypto` gradle task. 

Part of #18812


Diff:
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/HapiPropertySource.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/HapiPropertySource.java
index 79d7cbff675e..e6d54f94177f 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/HapiPropertySource.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/HapiPropertySource.java
@@ -274,6 +274,10 @@ static AccountID asAccount(String v) {
                 .build();
     }
 
+    static AccountID asAccount(long shard, long realm, String num) {
+        return asAccount(shard, realm, Long.parseLong(num));
+    }
+
     static AccountID asAccount(String shard, String realm, String num) {
         return asAccount(Long.parseLong(shard), Long.parseLong(realm), Long.parseLong(num));
     }
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/queries/HapiQueryOp.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/queries/HapiQueryOp.java
index 7acdaf6c20bb..e66406f177c8 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/queries/HapiQueryOp.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/queries/HapiQueryOp.java
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: Apache-2.0
 package com.hedera.services.bdd.spec.queries;
 
+import static com.hedera.services.bdd.spec.HapiPropertySource.asAccount;
 import static com.hedera.services.bdd.spec.queries.QueryUtils.reflectForCost;
 import static com.hedera.services.bdd.spec.queries.QueryUtils.reflectForPrecheck;
 import static com.hedera.services.bdd.spec.transactions.TxnUtils.asTransferList;
@@ -14,7 +15,6 @@
 
 import com.google.protobuf.ByteString;
 import com.hedera.node.app.hapi.utils.fee.SigValueObj;
-import com.hedera.services.bdd.spec.HapiPropertySource;
 import com.hedera.services.bdd.spec.HapiSpec;
 import com.hedera.services.bdd.spec.HapiSpecOperation;
 import com.hedera.services.bdd.spec.exceptions.HapiQueryCheckStateException;
@@ -438,7 +438,7 @@ public T setNode(String accountNum) {
     }
 
     public T setNodeFrom(Supplier<String> accountSupplier) {
-        nodeSupplier = Optional.of(() -> HapiPropertySource.asAccount(accountSupplier.get()));
+        nodeSupplier = Optional.of(() -> asAccount(accountSupplier.get()));
         return self();
     }
 
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/transactions/crypto/HapiCryptoCreate.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/transactions/crypto/HapiCryptoCreate.java
index 3eee0fb7c7d2..4e8cde0fd846 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/transactions/crypto/HapiCryptoCreate.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/transactions/crypto/HapiCryptoCreate.java
@@ -8,7 +8,6 @@
 import static com.hedera.services.bdd.spec.HapiPropertySource.asShard;
 import static com.hedera.services.bdd.spec.HapiPropertySource.idAsHeadlongAddress;
 import static com.hedera.services.bdd.spec.keys.KeyFactory.KeyType;
-import static com.hedera.services.bdd.spec.transactions.TxnUtils.asId;
 import static com.hedera.services.bdd.spec.transactions.TxnUtils.bannerWith;
 import static com.hedera.services.bdd.spec.transactions.TxnUtils.netOf;
 import static com.hedera.services.bdd.spec.transactions.TxnUtils.suFrom;
@@ -317,7 +316,7 @@ protected Consumer<TransactionBody.Builder> opBodyDef(final HapiSpec spec) throw
                                 b.setStakedAccountId(asAccount(
                                         effectiveShard.getShardNum(),
                                         effectiveRealm.getRealmNum(),
-                                        asId(stakedAccountId.get(), spec).getAccountNum()));
+                                        Long.parseLong(stakedAccountId.get())));
                             } else if (stakedNodeId.isPresent()) {
                                 b.setStakedNodeId(stakedNodeId.get());
                             }
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/Utils.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/Utils.java
index b844b7b32b3c..8022b8fde126 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/Utils.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/Utils.java
@@ -295,11 +295,14 @@ public static AccountAmount aaWith(final AccountID account, final long amount) {
                 .build();
     }
 
-    public static AccountAmount aaWith(HapiSpec spec, final ByteString evmAddress, final long amount) {
-        return AccountAmount.newBuilder()
-                .setAccountID(accountId(spec, evmAddress))
-                .setAmount(amount)
-                .build();
+    public static AccountAmount aaWith(final HapiSpec spec, final byte[] bytes, final long amount) {
+        final var acctId = accountIdWithHexedEvmAddress(spec.shard(), spec.realm(), hex(bytes));
+        return AccountAmount.newBuilder().setAccountID(acctId).setAmount(amount).build();
+    }
+
+    public static AccountAmount aaWith(final HapiSpec spec, final ByteString hexedEvmAddress, final long amount) {
+        final var acctId = accountIdWithHexedEvmAddress(spec.shard(), spec.realm(), hexedEvmAddress.toStringUtf8());
+        return AccountAmount.newBuilder().setAccountID(acctId).setAmount(amount).build();
     }
 
     public static AccountAmount aaWith(HapiSpec spec, final String hexedEvmAddress, final long amount) {
@@ -308,7 +311,7 @@ public static AccountAmount aaWith(HapiSpec spec, final String hexedEvmAddress,
 
     public static AccountAmount aaWith(long shard, long realm, final String hexedEvmAddress, final long amount) {
         return AccountAmount.newBuilder()
-                .setAccountID(accountId(shard, realm, hexedEvmAddress))
+                .setAccountID(accountIdWithHexedEvmAddress(shard, realm, hexedEvmAddress))
                 .setAmount(amount)
                 .build();
     }
@@ -321,11 +324,12 @@ public static NftTransfer ocWith(final AccountID from, final AccountID to, final
                 .build();
     }
 
-    public static AccountID accountId(HapiSpec spec, final String hexedEvmAddress) {
-        return accountId(spec.shard(), spec.realm(), hexedEvmAddress);
+    public static AccountID accountIdWithHexedEvmAddress(HapiSpec spec, final String hexedEvmAddress) {
+        return accountIdWithHexedEvmAddress(spec.shard(), spec.realm(), hexedEvmAddress);
     }
 
-    public static AccountID accountId(final long shard, final long realm, final String hexedEvmAddress) {
+    public static AccountID accountIdWithHexedEvmAddress(
+            final long shard, final long realm, final String hexedEvmAddress) {
         return AccountID.newBuilder()
                 .setShardNum(shard)
                 .setRealmNum(realm)
@@ -333,7 +337,7 @@ public static AccountID accountId(final long shard, final long realm, final Stri
                 .build();
     }
 
-    public static AccountID accountId(HapiSpec spec, final ByteString evmAddress) {
+    public static AccountID accountIdFromEvmAddress(final HapiSpec spec, final ByteString evmAddress) {
         return AccountID.newBuilder()
                 .setShardNum(spec.shard())
                 .setRealmNum(spec.realm())
@@ -437,6 +441,11 @@ public static Function<HapiSpec, Object[]> mirrorAddrParamFunction(final long co
         return spec -> List.of(mirrorAddrWith(spec, contractNum)).toArray();
     }
 
+    public static Address mirrorAddrWith(final long shard, final long realm, final long num) {
+        return Address.wrap(
+                toChecksumAddress(new BigInteger(1, HapiPropertySource.asSolidityAddress((int) shard, realm, num))));
+    }
+
     public static Address nonMirrorAddrWith(final long num) {
         return nonMirrorAddrWith(666, num);
     }
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/ethereum/EthereumSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/ethereum/EthereumSuite.java
index 0ecdd3689b62..8f0c8ae9a28c 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/ethereum/EthereumSuite.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/ethereum/EthereumSuite.java
@@ -66,7 +66,6 @@
 import static com.hedera.services.bdd.suites.HapiSuite.TOKEN_TREASURY;
 import static com.hedera.services.bdd.suites.HapiSuite.WEIBARS_IN_A_TINYBAR;
 import static com.hedera.services.bdd.suites.contract.Utils.FunctionType.FUNCTION;
-import static com.hedera.services.bdd.suites.contract.Utils.aaWith;
 import static com.hedera.services.bdd.suites.contract.Utils.asAddress;
 import static com.hedera.services.bdd.suites.contract.Utils.asToken;
 import static com.hedera.services.bdd.suites.contract.Utils.eventSignatureOf;
@@ -971,8 +970,8 @@ final Stream<DynamicTest> transferTokensViaEip2930TxSuccessfully() {
     final Stream<DynamicTest> accountDeletionResetsTheAliasNonce() {
 
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> counterAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> counterAlias = new AtomicReference<>();
         final AtomicReference<AccountID> aliasedAccountId = new AtomicReference<>();
         final AtomicReference<String> tokenNum = new AtomicReference<>();
         final var totalSupply = 50;
@@ -988,10 +987,9 @@ final Stream<DynamicTest> accountDeletionResetsTheAliasNonce() {
                     final var ecdsaKey = registry.getKey(SECP_256K1_SOURCE_KEY);
                     final var tmp = ecdsaKey.getECDSASecp256K1().toByteArray();
                     final var addressBytes = recoverAddressFromPubKey(tmp);
-                    final var evmAddressBytes = ByteString.copyFrom(addressBytes);
                     partyId.set(registry.getAccountID(PARTY));
-                    partyAlias.set(ByteString.copyFrom(asSolidityAddress(partyId.get())));
-                    counterAlias.set(evmAddressBytes);
+                    partyAlias.set(asSolidityAddress(partyId.get()));
+                    counterAlias.set(addressBytes);
                 }),
                 tokenCreate("token")
                         .tokenType(TokenType.FUNGIBLE_COMMON)
@@ -1002,12 +1000,12 @@ final Stream<DynamicTest> accountDeletionResetsTheAliasNonce() {
                         .exposingCreatedIdTo(tokenNum::set),
                 withOpContext((spec, opLog) -> {
                     var op1 = cryptoTransfer((s, b) -> b.setTransfers(TransferList.newBuilder()
-                                    .addAccountAmounts(aaWith(s, partyAlias.get(), -2 * ONE_HBAR))
-                                    .addAccountAmounts(aaWith(s, counterAlias.get(), +2 * ONE_HBAR))))
+                                    .addAccountAmounts(Utils.aaWith(s, partyAlias.get(), -2 * ONE_HBAR))
+                                    .addAccountAmounts(Utils.aaWith(s, counterAlias.get(), +2 * ONE_HBAR))))
                             .signedBy(DEFAULT_PAYER, PARTY)
                             .via(HBAR_XFER);
 
-                    var op2 = getAliasedAccountInfo(counterAlias.get())
+                    var op2 = getAliasedAccountInfo(ByteString.copyFrom(counterAlias.get()))
                             .logged()
                             .exposingIdTo(aliasedAccountId::set)
                             .has(accountWith()
@@ -1032,7 +1030,7 @@ final Stream<DynamicTest> accountDeletionResetsTheAliasNonce() {
                             .hasKnownStatus(ResponseCodeEnum.SUCCESS);
 
                     // assert account nonce is increased to 1
-                    var op4 = getAliasedAccountInfo(counterAlias.get())
+                    var op4 = getAliasedAccountInfo(ByteString.copyFrom(counterAlias.get()))
                             .logged()
                             .has(accountWith().nonce(1));
 
@@ -1046,12 +1044,12 @@ final Stream<DynamicTest> accountDeletionResetsTheAliasNonce() {
                 // try to create a new account with the same alias
                 withOpContext((spec, opLog) -> {
                     var op1 = cryptoTransfer((s, b) -> b.setTransfers(TransferList.newBuilder()
-                                    .addAccountAmounts(aaWith(s, partyAlias.get(), -2 * ONE_HBAR))
-                                    .addAccountAmounts(aaWith(s, counterAlias.get(), +2 * ONE_HBAR))))
+                                    .addAccountAmounts(Utils.aaWith(s, partyAlias.get(), -2 * ONE_HBAR))
+                                    .addAccountAmounts(Utils.aaWith(s, counterAlias.get(), +2 * ONE_HBAR))))
                             .signedBy(DEFAULT_PAYER, PARTY)
                             .hasKnownStatus(SUCCESS);
 
-                    var op2 = getAliasedAccountInfo(counterAlias.get())
+                    var op2 = getAliasedAccountInfo(ByteString.copyFrom(counterAlias.get()))
                             // TBD: balance should be 4 or 2 hbars
                             .has(accountWith().nonce(0).balance(2 * ONE_HBAR));
 
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/leaky/LeakyContractTestsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/leaky/LeakyContractTestsSuite.java
index 80674d240223..737065be3d5a 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/leaky/LeakyContractTestsSuite.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/leaky/LeakyContractTestsSuite.java
@@ -272,10 +272,7 @@ contract, GET_BYTECODE, asHeadlongAddress(factoryEvmAddress.get()), salt)
                 cryptoTransfer((spec, b) -> {
                             final var defaultPayerId = spec.registry().getAccountID(DEFAULT_PAYER);
                             b.setTransfers(TransferList.newBuilder()
-                                    .addAccountAmounts(aaWith(
-                                            spec,
-                                            ByteString.copyFrom(CommonUtils.unhex(expectedCreate2Address.get())),
-                                            +ONE_HBAR))
+                                    .addAccountAmounts(Utils.aaWith(spec, expectedCreate2Address.get(), +ONE_HBAR))
                                     .addAccountAmounts(aaWith(defaultPayerId, -ONE_HBAR)));
                         })
                         .signedBy(DEFAULT_PAYER)
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationSuite.java
index 3e1c1b2cc67b..28e09094e0b9 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationSuite.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationSuite.java
@@ -64,7 +64,7 @@
 import static com.hedera.services.bdd.suites.HapiSuite.TOKEN_TREASURY;
 import static com.hedera.services.bdd.suites.contract.Utils.FunctionType.FUNCTION;
 import static com.hedera.services.bdd.suites.contract.Utils.aaWith;
-import static com.hedera.services.bdd.suites.contract.Utils.accountId;
+import static com.hedera.services.bdd.suites.contract.Utils.accountIdFromEvmAddress;
 import static com.hedera.services.bdd.suites.contract.Utils.aliasContractIdKey;
 import static com.hedera.services.bdd.suites.contract.Utils.aliasDelegateContractKey;
 import static com.hedera.services.bdd.suites.contract.Utils.asAddress;
@@ -111,6 +111,7 @@
 import com.hedera.services.bdd.spec.transactions.contract.HapiParserUtil;
 import com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer;
 import com.hedera.services.bdd.spec.utilops.CustomSpecAssert;
+import com.hedera.services.bdd.suites.contract.Utils;
 import com.hederahashgraph.api.proto.java.AccountID;
 import com.hederahashgraph.api.proto.java.ContractID;
 import com.hederahashgraph.api.proto.java.NftTransfer;
@@ -197,10 +198,11 @@ final Stream<DynamicTest> inlineCreate2CanFailSafely() {
 
         return hapiTest(
                 uploadInitCode(contract),
-                contractCreate(contract).payingWith(GENESIS).via(CREATION).exposingNumTo(num -> {
-                    factoryEntityNum.set(num);
-                    factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num));
-                }),
+                contractCreate(contract)
+                        .payingWith(GENESIS)
+                        .via(CREATION)
+                        .exposingContractIdTo(id -> factoryEvmAddress.set(
+                                asHexedSolidityAddress((int) id.getShardNum(), id.getRealmNum(), id.getContractNum()))),
                 sourcing(
                         () -> contractCallLocal(contract, GET_BYTECODE, asHeadlongAddress(factoryEvmAddress.get()), foo)
                                 .exposingTypedResultsTo(results -> {
@@ -239,9 +241,15 @@ final Stream<DynamicTest> inlineCreateCanFailSafely() {
 
         return hapiTest(
                 uploadInitCode(contract),
-                contractCreate(contract).payingWith(GENESIS).via(creation).exposingNumTo(num -> {
-                    factoryEntityNum.set(num);
-                    factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num));
+                withOpContext((spec, opLog) -> {
+                    final var op = contractCreate(contract)
+                            .payingWith(GENESIS)
+                            .via(creation)
+                            .exposingNumTo(num -> {
+                                factoryEntityNum.set(num);
+                                factoryEvmAddress.set(asHexedSolidityAddress((int) spec.shard(), spec.realm(), num));
+                            });
+                    allRunFor(spec, op);
                 }),
                 sourcing(
                         () -> contractCallLocal(contract, GET_BYTECODE, asHeadlongAddress(factoryEvmAddress.get()), foo)
@@ -700,7 +708,7 @@ final Stream<DynamicTest> canUseAliasesInPrecompilesAndContractKeys() {
                                             .addNftTransfers(NftTransfer.newBuilder()
                                                     .setSerialNumber(2L)
                                                     .setSenderAccountID(tt)
-                                                    .setReceiverAccountID(accountId(
+                                                    .setReceiverAccountID(Utils.accountIdWithHexedEvmAddress(
                                                             spec.shard(), spec.realm(), userMirrorAddr.get()))));
                         })
                         .signedBy(DEFAULT_PAYER, TOKEN_TREASURY),
@@ -959,12 +967,16 @@ final Stream<DynamicTest> canMergeCreate2ChildWithHollowAccountUnlimitedAssociat
                 newKeyNamed(adminKey),
                 newKeyNamed(MULTI_KEY),
                 uploadInitCode(contract),
-                contractCreate(contract)
-                        .payingWith(GENESIS)
-                        .adminKey(adminKey)
-                        .entityMemo(ENTITY_MEMO)
-                        .via(CREATE_2_TXN)
-                        .exposingNumTo(num -> factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num))),
+                withOpContext((spec, opLog) -> {
+                    final var op = contractCreate(contract)
+                            .payingWith(GENESIS)
+                            .adminKey(adminKey)
+                            .entityMemo(ENTITY_MEMO)
+                            .via(CREATE_2_TXN)
+                            .exposingNumTo(num -> factoryEvmAddress.set(
+                                    asHexedSolidityAddress((int) spec.shard(), spec.realm(), num)));
+                    allRunFor(spec, op);
+                }),
                 cryptoCreate(PARTY).maxAutomaticTokenAssociations(2),
                 // GET BYTECODE OF THE CREATE2 CONTRACT
                 sourcing(() -> contractCallLocal(
@@ -1035,18 +1047,22 @@ final Stream<DynamicTest> canMergeCreate2ChildWithHollowAccountHbarAndFungibleTr
         final var initialTokenSupply = 1000;
         final AtomicReference<TokenID> ftId = new AtomicReference<>();
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
 
         return hapiTest(
                 newKeyNamed(adminKey),
                 newKeyNamed(MULTI_KEY),
                 uploadInitCode(contract),
-                contractCreate(contract)
-                        .payingWith(GENESIS)
-                        .adminKey(adminKey)
-                        .entityMemo(ENTITY_MEMO)
-                        .via(CREATE_2_TXN)
-                        .exposingNumTo(num -> factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num))),
+                withOpContext((spec, opLog) -> {
+                    final var op = contractCreate(contract)
+                            .payingWith(GENESIS)
+                            .adminKey(adminKey)
+                            .entityMemo(ENTITY_MEMO)
+                            .via(CREATE_2_TXN)
+                            .exposingNumTo(num -> factoryEvmAddress.set(
+                                    asHexedSolidityAddress((int) spec.shard(), spec.realm(), num)));
+                    allRunFor(spec, op);
+                }),
                 cryptoCreate(PARTY).maxAutomaticTokenAssociations(2),
                 tokenCreate(A_TOKEN)
                         .tokenType(FUNGIBLE_COMMON)
@@ -1139,18 +1155,22 @@ final Stream<DynamicTest> canMergeCreate2ChildWithHollowAccountFungibleAndNftTra
         final AtomicReference<TokenID> ftId = new AtomicReference<>();
         final AtomicReference<TokenID> nftId = new AtomicReference<>();
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
 
         return hapiTest(
                 newKeyNamed(adminKey),
                 newKeyNamed(MULTI_KEY),
                 uploadInitCode(contract),
-                contractCreate(contract)
-                        .payingWith(GENESIS)
-                        .adminKey(adminKey)
-                        .entityMemo(ENTITY_MEMO)
-                        .via(CREATE_2_TXN)
-                        .exposingNumTo(num -> factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num))),
+                withOpContext((spec, opLog) -> {
+                    final var op = contractCreate(contract)
+                            .payingWith(GENESIS)
+                            .adminKey(adminKey)
+                            .entityMemo(ENTITY_MEMO)
+                            .via(CREATE_2_TXN)
+                            .exposingNumTo(num -> factoryEvmAddress.set(
+                                    asHexedSolidityAddress((int) spec.shard(), spec.realm(), num)));
+                    allRunFor(spec, op);
+                }),
                 cryptoCreate(PARTY).maxAutomaticTokenAssociations(2),
                 tokenCreate(A_TOKEN)
                         .tokenType(FUNGIBLE_COMMON)
@@ -1244,18 +1264,22 @@ final Stream<DynamicTest> canMergeCreate2ChildWithHollowAccountFungibleTransferU
         final var initialTokenSupply = 1000;
         final AtomicReference<TokenID> ftId = new AtomicReference<>();
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
 
         return hapiTest(
                 newKeyNamed(adminKey),
                 newKeyNamed(MULTI_KEY),
                 uploadInitCode(contract),
-                contractCreate(contract)
-                        .payingWith(GENESIS)
-                        .adminKey(adminKey)
-                        .entityMemo(ENTITY_MEMO)
-                        .via(CREATE_2_TXN)
-                        .exposingNumTo(num -> factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num))),
+                withOpContext((spec, log) -> {
+                    final var op = contractCreate(contract)
+                            .payingWith(GENESIS)
+                            .adminKey(adminKey)
+                            .entityMemo(ENTITY_MEMO)
+                            .via(CREATE_2_TXN)
+                            .exposingNumTo(num -> factoryEvmAddress.set(
+                                    asHexedSolidityAddress((int) spec.shard(), spec.realm(), num)));
+                    allRunFor(spec, op);
+                }),
                 cryptoCreate(PARTY).maxAutomaticTokenAssociations(2),
                 tokenCreate(A_TOKEN)
                         .tokenType(FUNGIBLE_COMMON)
@@ -1337,19 +1361,23 @@ final Stream<DynamicTest> canMergeCreate2ChildWithHollowAccountNftTransfersUnlim
 
         final AtomicReference<TokenID> nftId = new AtomicReference<>();
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
         final int nftTransfersSize = 10;
 
         return hapiTest(
                 newKeyNamed(adminKey),
                 newKeyNamed(MULTI_KEY),
                 uploadInitCode(contract),
-                contractCreate(contract)
-                        .payingWith(GENESIS)
-                        .adminKey(adminKey)
-                        .entityMemo(ENTITY_MEMO)
-                        .via(CREATE_2_TXN)
-                        .exposingNumTo(num -> factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num))),
+                withOpContext((spec, log) -> {
+                    final var op = contractCreate(contract)
+                            .payingWith(GENESIS)
+                            .adminKey(adminKey)
+                            .entityMemo(ENTITY_MEMO)
+                            .via(CREATE_2_TXN)
+                            .exposingNumTo(num -> factoryEvmAddress.set(
+                                    asHexedSolidityAddress((int) spec.shard(), spec.realm(), num)));
+                    allRunFor(spec, op);
+                }),
                 cryptoCreate(PARTY).maxAutomaticTokenAssociations(2),
                 tokenCreate(NFT_INFINITE_SUPPLY_TOKEN)
                         .tokenType(TokenType.NON_FUNGIBLE_UNIQUE)
@@ -1495,14 +1523,13 @@ public static CustomSpecAssert setIdentifiers(
             Optional<AtomicReference<TokenID>> ftId,
             Optional<AtomicReference<TokenID>> nftId,
             Optional<AtomicReference<AccountID>> partyId,
-            Optional<AtomicReference<ByteString>> partyAlias) {
+            Optional<AtomicReference<byte[]>> partyAlias) {
         return withOpContext((spec, opLog) -> {
             final var registry = spec.registry();
             ftId.ifPresent(id -> id.set(registry.getTokenID(A_TOKEN)));
             nftId.ifPresent(id -> id.set(registry.getTokenID(NFT_INFINITE_SUPPLY_TOKEN)));
             partyId.ifPresent(id -> id.set(registry.getAccountID(PARTY)));
-            partyAlias.ifPresent(
-                    alias -> partyId.ifPresent(id -> alias.set(ByteString.copyFrom(asSolidityAddress(id.get())))));
+            partyAlias.ifPresent(alias -> partyId.ifPresent(id -> alias.set(asSolidityAddress(id.get()))));
         });
     }
 
@@ -1513,13 +1540,13 @@ private String asLiteralHexed(final Address address) {
     private Iterable<NftTransfer> buildNftTransfers(
             final HapiSpec spec,
             final int nftTransfersSize,
-            AtomicReference<ByteString> partyAlias,
+            AtomicReference<byte[]> partyAlias,
             AtomicReference<String> expectedCreate2Address) {
         NftTransfer[] nftTransfers = new NftTransfer[nftTransfersSize];
         for (int i = 0; i < nftTransfersSize; i++) {
             nftTransfers[i] = ocWith(
-                    accountId(spec, partyAlias.get()),
-                    accountId(spec, ByteString.copyFrom(CommonUtils.unhex(expectedCreate2Address.get()))),
+                    accountIdFromEvmAddress(spec, ByteString.copyFrom(partyAlias.get())),
+                    accountIdFromEvmAddress(spec, ByteString.copyFrom(CommonUtils.unhex(expectedCreate2Address.get()))),
                     i + 1);
         }
         return Arrays.asList(nftTransfers);
@@ -1529,13 +1556,12 @@ private HapiCryptoTransfer lazyCreateAccountWithFungibleTransfer(
             String creation,
             AtomicReference<String> expectedCreate2Address,
             AtomicReference<TokenID> ftId,
-            AtomicReference<ByteString> partyAlias) {
+            AtomicReference<byte[]> partyAlias) {
         return cryptoTransfer((spec, b) -> {
                     b.addTokenTransfers(TokenTransferList.newBuilder()
                             .setToken(ftId.get())
-                            .addTransfers(aaWith(spec, partyAlias.get(), -500))
-                            .addTransfers(aaWith(
-                                    spec, ByteString.copyFrom(CommonUtils.unhex(expectedCreate2Address.get())), +500)));
+                            .addTransfers(Utils.aaWith(spec, partyAlias.get(), -500))
+                            .addTransfers(Utils.aaWith(spec, expectedCreate2Address.get(), +500)));
                 })
                 .signedBy(DEFAULT_PAYER, PARTY)
                 .fee(ONE_HBAR)
@@ -1558,31 +1584,25 @@ public static HapiCryptoTransfer lazyCreateAccount(
             AtomicReference<String> expectedCreate2Address,
             Optional<AtomicReference<TokenID>> ftId,
             Optional<AtomicReference<TokenID>> nftId,
-            AtomicReference<ByteString> partyAlias) {
+            AtomicReference<byte[]> partyAlias) {
         return cryptoTransfer((spec, b) -> {
                     final var defaultPayerId = spec.registry().getAccountID(DEFAULT_PAYER);
                     var transferListBuilder = TransferList.newBuilder()
-                            .addAccountAmounts(aaWith(
-                                    spec,
-                                    ByteString.copyFrom(CommonUtils.unhex(expectedCreate2Address.get())),
-                                    +ONE_HBAR))
+                            .addAccountAmounts(Utils.aaWith(spec, expectedCreate2Address.get(), +ONE_HBAR))
                             .addAccountAmounts(aaWith(defaultPayerId, -ONE_HBAR));
 
                     b.setTransfers(transferListBuilder);
 
                     ftId.ifPresent(id -> b.addTokenTransfers(TokenTransferList.newBuilder()
                             .setToken(id.get())
-                            .addTransfers(aaWith(spec, partyAlias.get(), -500))
-                            .addTransfers(aaWith(
-                                    spec,
-                                    ByteString.copyFrom(CommonUtils.unhex(expectedCreate2Address.get())),
-                                    +500))));
+                            .addTransfers(Utils.aaWith(spec, partyAlias.get(), -500))
+                            .addTransfers(Utils.aaWith(spec, expectedCreate2Address.get(), +500))));
 
                     nftId.ifPresent(id -> b.addTokenTransfers(TokenTransferList.newBuilder()
                             .setToken(id.get())
                             .addNftTransfers(ocWith(
-                                    accountId(spec, partyAlias.get()),
-                                    accountId(
+                                    accountIdFromEvmAddress(spec, ByteString.copyFrom(partyAlias.get())),
+                                    accountIdFromEvmAddress(
                                             spec, ByteString.copyFrom(CommonUtils.unhex(expectedCreate2Address.get()))),
                                     1L))));
                 })
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/airdrops/AirdropFromContractTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/airdrops/AirdropFromContractTest.java
index 5bfa4f27c841..b7c113ac234e 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/airdrops/AirdropFromContractTest.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/airdrops/AirdropFromContractTest.java
@@ -26,7 +26,7 @@
 import static com.hedera.services.bdd.spec.utilops.UtilVerbs.newKeyNamed;
 import static com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext;
 import static com.hedera.services.bdd.suites.HapiSuite.GENESIS;
-import static com.hedera.services.bdd.suites.contract.Utils.accountId;
+import static com.hedera.services.bdd.suites.contract.Utils.accountIdFromEvmAddress;
 import static com.hedera.services.bdd.suites.contract.Utils.asAddress;
 import static com.hedera.services.bdd.suites.contract.precompile.airdrops.SystemContractAirdropHelper.checkForBalances;
 import static com.hedera.services.bdd.suites.contract.precompile.airdrops.SystemContractAirdropHelper.checkForEmptyBalance;
@@ -404,7 +404,7 @@ public Stream<DynamicTest> airdropToAddressWithNoAccount(
                                     "tokenAirdrop",
                                     token,
                                     sender.addressOn(spec.targetNetworkOrThrow()),
-                                    asAddress(accountId(spec, hollowAccountAlias.get())),
+                                    asAddress(accountIdFromEvmAddress(spec, hollowAccountAlias.get())),
                                     10L)
                             .sending(85_000_000L)
                             .gas(1_500_000L)
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/airdrops/AirdropToContractSystemContractTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/airdrops/AirdropToContractSystemContractTest.java
index 3ab6a822cc50..71b25772951f 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/airdrops/AirdropToContractSystemContractTest.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/airdrops/AirdropToContractSystemContractTest.java
@@ -58,7 +58,6 @@
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_NOT_ASSOCIATED_TO_ACCOUNT;
 
 import com.esaulpaugh.headlong.abi.Address;
-import com.google.protobuf.ByteString;
 import com.hedera.services.bdd.junit.HapiTest;
 import com.hedera.services.bdd.junit.HapiTestLifecycle;
 import com.hedera.services.bdd.junit.LeakyHapiTest;
@@ -491,7 +490,7 @@ public Stream<DynamicTest> canAirdropToContractDeployedWithCreate2(
             final AtomicReference<String> factoryEvmAddress = new AtomicReference<>();
             final AtomicReference<byte[]> testContractInitcode = new AtomicReference<>();
             final AtomicReference<String> expectedCreate2Address = new AtomicReference<>();
-            final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
+            final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
             final AtomicReference<String> hollowCreationAddress = new AtomicReference<>();
 
             final var salt = BigInteger.valueOf(42);
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/traceability/TraceabilitySuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/traceability/TraceabilitySuite.java
index 492c9920bd27..da81c09d83b4 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/traceability/TraceabilitySuite.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/traceability/TraceabilitySuite.java
@@ -104,6 +104,7 @@
 import com.hedera.services.bdd.spec.transactions.TxnVerbs;
 import com.hedera.services.bdd.spec.transactions.contract.HapiParserUtil;
 import com.hedera.services.bdd.spec.verification.traceability.SidecarWatcher;
+import com.hedera.services.bdd.suites.contract.Utils;
 import com.hedera.services.stream.proto.CallOperationType;
 import com.hedera.services.stream.proto.ContractAction;
 import com.hederahashgraph.api.proto.java.AccountID;
@@ -122,7 +123,6 @@
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.tuweni.bytes.Bytes;
-import org.hiero.base.utility.CommonUtils;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.DynamicTest;
 import org.junit.jupiter.api.Order;
@@ -4752,13 +4752,16 @@ final Stream<DynamicTest> hollowAccountCreate2MergeExportsExpectedSidecars() {
                 newKeyNamed(adminKey),
                 newKeyNamed(MULTI_KEY),
                 uploadInitCode(create2Factory),
-                contractCreate(create2Factory)
-                        .payingWith(GENESIS)
-                        .adminKey(adminKey)
-                        .entityMemo(entityMemo)
-                        .via(CREATE_2_TXN)
-                        .exposingNumTo(
-                                num -> factoryEvmAddress.set(HapiPropertySource.asHexedSolidityAddress(0, 0, num))),
+                withOpContext((spec, opLog) -> {
+                    final var op = contractCreate(create2Factory)
+                            .payingWith(GENESIS)
+                            .adminKey(adminKey)
+                            .entityMemo(entityMemo)
+                            .via(CREATE_2_TXN)
+                            .exposingNumTo(num -> factoryEvmAddress.set(
+                                    HapiPropertySource.asHexedSolidityAddress((int) spec.shard(), spec.realm(), num)));
+                    allRunFor(spec, op);
+                }),
                 cryptoCreate(PARTY).maxAutomaticTokenAssociations(2),
                 sourcing(() -> contractCallLocal(
                                 create2Factory, GET_BYTECODE, asHeadlongAddress(factoryEvmAddress.get()), salt)
@@ -4783,10 +4786,7 @@ create2Factory, GET_BYTECODE, asHeadlongAddress(factoryEvmAddress.get()), salt)
                 cryptoTransfer((spec, b) -> {
                             final var defaultPayerId = spec.registry().getAccountID(DEFAULT_PAYER);
                             b.setTransfers(TransferList.newBuilder()
-                                    .addAccountAmounts(aaWith(
-                                            spec,
-                                            ByteString.copyFrom(CommonUtils.unhex(expectedCreate2Address.get())),
-                                            +ONE_HBAR))
+                                    .addAccountAmounts(Utils.aaWith(spec, expectedCreate2Address.get(), +ONE_HBAR))
                                     .addAccountAmounts(aaWith(defaultPayerId, -ONE_HBAR)));
                         })
                         .signedBy(DEFAULT_PAYER, PARTY)
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountCreationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountCreationSuite.java
index b2ec92af20df..01c0a77eadde 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountCreationSuite.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountCreationSuite.java
@@ -59,7 +59,7 @@
 import static com.hedera.services.bdd.suites.HapiSuite.THREE_MONTHS_IN_SECONDS;
 import static com.hedera.services.bdd.suites.HapiSuite.TOKEN_TREASURY;
 import static com.hedera.services.bdd.suites.contract.Utils.aaWith;
-import static com.hedera.services.bdd.suites.contract.Utils.accountId;
+import static com.hedera.services.bdd.suites.contract.Utils.accountIdFromEvmAddress;
 import static com.hedera.services.bdd.suites.contract.Utils.ocWith;
 import static com.hedera.services.bdd.suites.contract.hapi.ContractUpdateSuite.ADMIN_KEY;
 import static com.hedera.services.bdd.suites.crypto.AutoCreateUtils.updateSpecFor;
@@ -84,6 +84,7 @@
 import com.hedera.services.bdd.junit.HapiTest;
 import com.hedera.services.bdd.spec.keys.KeyShape;
 import com.hedera.services.bdd.spec.queries.meta.HapiGetTxnRecord;
+import com.hedera.services.bdd.suites.contract.Utils;
 import com.hederahashgraph.api.proto.java.AccountID;
 import com.hederahashgraph.api.proto.java.ContractID;
 import com.hederahashgraph.api.proto.java.Key;
@@ -769,7 +770,7 @@ final Stream<DynamicTest> hollowAccountCreationWithCryptoTransfer() {
     final Stream<DynamicTest> failureAfterHollowAccountCreationReclaimsAlias() {
         final var underfunded = "underfunded";
         final var secondTransferTxn = "SecondTransferTxn";
-        final AtomicReference<ByteString> targetAddress = new AtomicReference<>();
+        final AtomicReference<byte[]> targetAddress = new AtomicReference<>();
         return hapiTest(
                 newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE),
                 cryptoCreate(LAZY_CREATE_SPONSOR).balance(INITIAL_BALANCE * ONE_HBAR),
@@ -779,7 +780,7 @@ final Stream<DynamicTest> failureAfterHollowAccountCreationReclaimsAlias() {
                             .getKey(SECP_256K1_SOURCE_KEY)
                             .getECDSASecp256K1()
                             .toByteArray();
-                    final var evmAddress = ByteString.copyFrom(recoverAddressFromPubKey(ecdsaKey));
+                    final var evmAddress = recoverAddressFromPubKey(ecdsaKey);
                     targetAddress.set(evmAddress);
                     final var controlledOp = cryptoTransfer((sameSpec, b) -> {
                                 final var sponsorId = spec.registry().getAccountID(LAZY_CREATE_SPONSOR);
@@ -787,7 +788,7 @@ final Stream<DynamicTest> failureAfterHollowAccountCreationReclaimsAlias() {
                                 final var funding = spec.registry().getAccountID(FUNDING);
                                 b.setTransfers(TransferList.newBuilder()
                                         .addAccountAmounts(aaWith(sponsorId, -ONE_HUNDRED_HBARS))
-                                        .addAccountAmounts(aaWith(spec, evmAddress, +ONE_HUNDRED_HBARS))
+                                        .addAccountAmounts(Utils.aaWith(spec, evmAddress, +ONE_HUNDRED_HBARS))
                                         .addAccountAmounts(aaWith(underfundedId, -ONE_HUNDRED_HBARS))
                                         .addAccountAmounts(aaWith(funding, +ONE_HUNDRED_HBARS))
                                         .build());
@@ -801,8 +802,8 @@ final Stream<DynamicTest> failureAfterHollowAccountCreationReclaimsAlias() {
                 }),
                 getTxnRecord(TRANSFER_TXN).andAllChildRecords().logged(),
                 getAliasedAccountInfo(SECP_256K1_SOURCE_KEY).nodePayment(123).hasAnswerOnlyPrecheck(INVALID_ACCOUNT_ID),
-                sourcing(() -> cryptoTransfer(
-                                tinyBarsFromTo(LAZY_CREATE_SPONSOR, targetAddress.get(), ONE_HUNDRED_HBARS))
+                sourcing(() -> cryptoTransfer(tinyBarsFromTo(
+                                LAZY_CREATE_SPONSOR, ByteString.copyFrom(targetAddress.get()), ONE_HUNDRED_HBARS))
                         .signedBy(DEFAULT_PAYER, LAZY_CREATE_SPONSOR)
                         .via(secondTransferTxn)),
                 getAliasedAccountInfo(SECP_256K1_SOURCE_KEY).logged());
@@ -1220,8 +1221,8 @@ final Stream<DynamicTest> multipleAutoAccountCreations() {
     final Stream<DynamicTest> transferHbarsToEVMAddressAlias() {
 
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> counterAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> counterAlias = new AtomicReference<>();
 
         return hapiTest(
                 cryptoCreate(PARTY).maxAutomaticTokenAssociations(2),
@@ -1232,19 +1233,19 @@ final Stream<DynamicTest> transferHbarsToEVMAddressAlias() {
                     final var tmp = ecdsaKey.getECDSASecp256K1().toByteArray();
                     final var addressBytes = recoverAddressFromPubKey(tmp);
                     assert addressBytes != null;
-                    final var evmAddressBytes = ByteString.copyFrom(addressBytes);
                     partyId.set(registry.getAccountID(PARTY));
-                    partyAlias.set(ByteString.copyFrom(asSolidityAddress(partyId.get())));
-                    counterAlias.set(evmAddressBytes);
+                    partyAlias.set(asSolidityAddress(partyId.get()));
+                    counterAlias.set(addressBytes);
                 }),
                 withOpContext((spec, opLog) -> {
                     var op1 = cryptoTransfer((s, b) -> b.setTransfers(TransferList.newBuilder()
-                                    .addAccountAmounts(aaWith(spec, partyAlias.get(), -2 * ONE_HBAR))
-                                    .addAccountAmounts(aaWith(spec, counterAlias.get(), +2 * ONE_HBAR))))
+                                    .addAccountAmounts(Utils.aaWith(spec, partyAlias.get(), -2 * ONE_HBAR))
+                                    .addAccountAmounts(Utils.aaWith(spec, counterAlias.get(), +2 * ONE_HBAR))))
                             .signedBy(DEFAULT_PAYER, PARTY)
                             .via(HBAR_XFER);
 
-                    var op2 = getAliasedAccountInfo(counterAlias.get())
+                    final var counterAliasStr = ByteString.copyFrom(counterAlias.get());
+                    var op2 = getAliasedAccountInfo(counterAliasStr)
                             .has(accountWith()
                                     .expectedBalanceWithChargedUsd(2 * ONE_HBAR, 0, 0)
                                     .hasEmptyKey()
@@ -1323,8 +1324,8 @@ final Stream<DynamicTest> transferFungibleToEVMAddressAlias() {
         final var fungibleToken = "fungibleToken";
         final AtomicReference<TokenID> ftId = new AtomicReference<>();
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> counterAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> counterAlias = new AtomicReference<>();
 
         return hapiTest(
                 newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE),
@@ -1336,27 +1337,25 @@ final Stream<DynamicTest> transferFungibleToEVMAddressAlias() {
                     final var tmp = ecdsaKey.getECDSASecp256K1().toByteArray();
                     final var addressBytes = recoverAddressFromPubKey(tmp);
                     assert addressBytes != null;
-                    final var evmAddressBytes = ByteString.copyFrom(addressBytes);
                     ftId.set(registry.getTokenID(fungibleToken));
                     partyId.set(registry.getAccountID(PARTY));
-                    partyAlias.set(ByteString.copyFrom(asSolidityAddress(partyId.get())));
-                    counterAlias.set(evmAddressBytes);
+                    partyAlias.set(asSolidityAddress(partyId.get()));
+                    counterAlias.set(addressBytes);
                 }),
                 withOpContext((spec, opLog) -> {
-                    opLog.warn("Creating hollow account with alias "
-                            + Arrays.toString(counterAlias.get().toByteArray()));
-                    opLog.warn("From party with alias "
-                            + Arrays.toString(partyAlias.get().toByteArray()));
+                    opLog.warn("Creating hollow account with alias " + Arrays.toString(counterAlias.get()));
+                    opLog.warn("From party with alias " + Arrays.toString(partyAlias.get()));
                     /* hollow account created with fungible token transfer as expected */
                     final var cryptoTransferWithLazyCreate = cryptoTransfer(
                                     (s, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                             .setToken(ftId.get())
-                                            .addTransfers(aaWith(spec, partyAlias.get(), -500))
-                                            .addTransfers(aaWith(spec, counterAlias.get(), +500))))
+                                            .addTransfers(Utils.aaWith(spec, partyAlias.get(), -500))
+                                            .addTransfers(Utils.aaWith(spec, counterAlias.get(), +500))))
                             .signedBy(DEFAULT_PAYER, PARTY)
                             .via(FT_XFER);
 
-                    final var getHollowAccountInfoAfterCreation = getAliasedAccountInfo(counterAlias.get())
+                    final var evmAliasStr = ByteString.copyFrom(counterAlias.get());
+                    final var getHollowAccountInfoAfterCreation = getAliasedAccountInfo(evmAliasStr)
                             .hasToken(relationshipWith(fungibleToken).balance(500))
                             .has(accountWith()
                                     .hasEmptyKey()
@@ -1377,13 +1376,12 @@ final Stream<DynamicTest> transferFungibleToEVMAddressAlias() {
                             txnRequiringHollowAccountSignature);
 
                     /* transfers of hbar or fungible tokens to the hollow account should succeed */
-                    final var hbarTransfer = cryptoTransfer(
-                                    tinyBarsFromTo(PARTY, counterAlias.get(), ONE_HUNDRED_HBARS))
+                    final var hbarTransfer = cryptoTransfer(tinyBarsFromTo(PARTY, evmAliasStr, ONE_HUNDRED_HBARS))
                             .hasKnownStatus(SUCCESS)
                             .via(TRANSFER_TXN_2);
 
                     final var fungibleTokenTransfer = cryptoTransfer(
-                                    moving(5, fungibleToken).between(PARTY, counterAlias.get()))
+                                    moving(5, fungibleToken).between(PARTY, evmAliasStr))
                             .signedBy(DEFAULT_PAYER, PARTY)
                             .via(TRANSFER_TXN_2);
 
@@ -1393,7 +1391,7 @@ final Stream<DynamicTest> transferFungibleToEVMAddressAlias() {
                             .signedBy(DEFAULT_PAYER, PARTY)
                             .via(TRANSFER_TXN_2);
 
-                    final var getHollowAccountInfoAfterTransfers = getAliasedAccountInfo(counterAlias.get())
+                    final var getHollowAccountInfoAfterTransfers = getAliasedAccountInfo(evmAliasStr)
                             .hasToken(relationshipWith(fungibleToken).balance(506))
                             .has(accountWith()
                                     .hasEmptyKey()
@@ -1449,8 +1447,8 @@ final Stream<DynamicTest> transferNonFungibleToEVMAddressAlias() {
                                     (s, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                             .setToken(nftId.get())
                                             .addNftTransfers(ocWith(
-                                                    accountId(spec, partyAlias.get()),
-                                                    accountId(spec, counterAlias.get()),
+                                                    accountIdFromEvmAddress(spec, partyAlias.get()),
+                                                    accountIdFromEvmAddress(spec, counterAlias.get()),
                                                     1L))))
                             .signedBy(DEFAULT_PAYER, PARTY)
                             .via(NFT_XFER);
@@ -1516,7 +1514,7 @@ final Stream<DynamicTest> transferNonFungibleToEVMAddressAlias() {
 
     @HapiTest
     final Stream<DynamicTest> cannotAutoCreateWithTxnToLongZero() {
-        final AtomicReference<ByteString> evmAddress = new AtomicReference<>();
+        final AtomicReference<byte[]> evmAddress = new AtomicReference<>();
 
         return hapiTest(
                 newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE),
@@ -1526,11 +1524,11 @@ final Stream<DynamicTest> cannotAutoCreateWithTxnToLongZero() {
                     final var ecdsaKey = registry.getKey(SECP_256K1_SOURCE_KEY);
                     final var tmp = ecdsaKey.getECDSASecp256K1().toByteArray();
                     final var addressBytes = recoverAddressFromPubKey(tmp);
-                    final var evmAddressBytes = ByteString.copyFrom(addressBytes);
-                    evmAddress.set(evmAddressBytes);
+                    evmAddress.set(addressBytes);
                 }),
                 withOpContext((spec, opLog) -> {
-                    final var validTransfer = cryptoTransfer(tinyBarsFromTo(PAYER, evmAddress.get(), ONE_HBAR))
+                    final var evmAddressStr = ByteString.copyFrom(evmAddress.get());
+                    final var validTransfer = cryptoTransfer(tinyBarsFromTo(PAYER, evmAddressStr, ONE_HBAR))
                             .hasKnownStatus(SUCCESS)
                             .via("passedTxn");
 
@@ -1545,11 +1543,12 @@ final Stream<DynamicTest> cannotAutoCreateWithTxnToLongZero() {
                     allRunFor(spec, validTransfer, invalidTransferToLongZero);
                 }),
                 withOpContext((spec, opLog) -> {
+                    final var evmAddressStr = ByteString.copyFrom(evmAddress.get());
                     getTxnRecord("failedTxn").logged();
                     getTxnRecord("passedTxn")
                             .hasChildRecordCount(1)
                             .hasChildRecords(
-                                    recordWith().status(SUCCESS).memo(LAZY_MEMO).alias(evmAddress.get()));
+                                    recordWith().status(SUCCESS).memo(LAZY_MEMO).alias(evmAddressStr));
                 }));
     }
 
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountCreationUnlimitedAssociationsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountCreationUnlimitedAssociationsSuite.java
index 5995c07ebd5c..fa9d287699d0 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountCreationUnlimitedAssociationsSuite.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountCreationUnlimitedAssociationsSuite.java
@@ -37,7 +37,6 @@
 import static com.hedera.services.bdd.suites.HapiSuite.SECP_256K1_SOURCE_KEY;
 import static com.hedera.services.bdd.suites.HapiSuite.THREE_MONTHS_IN_SECONDS;
 import static com.hedera.services.bdd.suites.HapiSuite.TOKEN_TREASURY;
-import static com.hedera.services.bdd.suites.contract.Utils.aaWith;
 import static com.hedera.services.bdd.suites.crypto.AutoAccountCreationSuite.NFT_INFINITE_SUPPLY_TOKEN;
 import static com.hedera.services.bdd.suites.crypto.AutoAccountCreationSuite.assertAliasBalanceAndFeeInChildRecord;
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_SIGNATURE;
@@ -48,6 +47,7 @@
 import com.hedera.services.bdd.junit.HapiTest;
 import com.hedera.services.bdd.junit.LeakyHapiTest;
 import com.hedera.services.bdd.spec.queries.meta.HapiGetTxnRecord;
+import com.hedera.services.bdd.suites.contract.Utils;
 import com.hederahashgraph.api.proto.java.AccountID;
 import com.hederahashgraph.api.proto.java.NftTransfer;
 import com.hederahashgraph.api.proto.java.TokenID;
@@ -202,8 +202,8 @@ final Stream<DynamicTest> autoAccountCreationsUnlimitedAssociationsDisabled() {
     @HapiTest
     final Stream<DynamicTest> transferHbarsToEVMAddressAliasUnlimitedAssociations() {
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> counterAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> counterAlias = new AtomicReference<>();
 
         return hapiTest(
                 cryptoCreate(PARTY).maxAutomaticTokenAssociations(2),
@@ -214,18 +214,18 @@ final Stream<DynamicTest> transferHbarsToEVMAddressAliasUnlimitedAssociations()
                     final var tmp = ecdsaKey.getECDSASecp256K1().toByteArray();
                     final var addressBytes = recoverAddressFromPubKey(tmp);
                     assert addressBytes != null;
-                    final var evmAddressBytes = ByteString.copyFrom(addressBytes);
                     partyId.set(registry.getAccountID(PARTY));
-                    partyAlias.set(ByteString.copyFrom(asSolidityAddress(partyId.get())));
-                    counterAlias.set(evmAddressBytes);
+                    partyAlias.set(asSolidityAddress(partyId.get()));
+                    counterAlias.set(addressBytes);
                 }),
                 withOpContext((spec, opLog) -> {
+                    final var counterAliasStr = ByteString.copyFrom(counterAlias.get());
 
                     // account create with key than delete account
                     var accountCreate = cryptoCreate("testAccount")
                             .key(SECP_256K1_SOURCE_KEY)
                             .maxAutomaticTokenAssociations(-1)
-                            .alias(counterAlias.get());
+                            .alias(counterAliasStr);
 
                     var getAccountInfo = getAccountInfo("testAccount")
                             .has(accountWith().key(SECP_256K1_SOURCE_KEY).maxAutoAssociations(-1));
@@ -236,13 +236,13 @@ final Stream<DynamicTest> transferHbarsToEVMAddressAliasUnlimitedAssociations()
 
                     // create hollow account with the deleted account alias
                     var hollowAccount = cryptoTransfer((s, b) -> b.setTransfers(TransferList.newBuilder()
-                                    .addAccountAmounts(aaWith(s, partyAlias.get(), -2 * ONE_HBAR))
-                                    .addAccountAmounts(aaWith(s, counterAlias.get(), +2 * ONE_HBAR))))
+                                    .addAccountAmounts(Utils.aaWith(s, partyAlias.get(), -2 * ONE_HBAR))
+                                    .addAccountAmounts(Utils.aaWith(s, counterAlias.get(), +2 * ONE_HBAR))))
                             .signedBy(DEFAULT_PAYER, PARTY)
                             .via(HBAR_XFER);
 
                     // verify hollow account creation
-                    var hollowAccountCreated = getAliasedAccountInfo(counterAlias.get())
+                    var hollowAccountCreated = getAliasedAccountInfo(counterAliasStr)
                             .has(accountWith()
                                     .expectedBalanceWithChargedUsd(2 * ONE_HBAR, 0, 0)
                                     .hasEmptyKey()
@@ -284,7 +284,7 @@ final Stream<DynamicTest> transferHbarsToEVMAddressAliasUnlimitedAssociations()
                     allRunFor(spec, completion);
 
                     // verify completed hollow account
-                    var completedAccount = getAliasedAccountInfo(counterAlias.get())
+                    var completedAccount = getAliasedAccountInfo(ByteString.copyFrom(counterAlias.get()))
                             .has(accountWith()
                                     .expectedBalanceWithChargedUsd(2 * ONE_HBAR, 0.00015, 10)
                                     .key(SECP_256K1_SOURCE_KEY)
@@ -309,8 +309,8 @@ final Stream<DynamicTest> transferHbarsToEVMAddressAliasUnlimitedAssociations()
     @HapiTest
     final Stream<DynamicTest> transferTokensToEVMAddressAliasUnlimitedAssociations() {
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> counterAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> counterAlias = new AtomicReference<>();
         final AtomicReference<TokenID> ftId = new AtomicReference<>();
 
         return hapiTest(
@@ -326,19 +326,19 @@ final Stream<DynamicTest> transferTokensToEVMAddressAliasUnlimitedAssociations()
                     final var tmp = ecdsaKey.getECDSASecp256K1().toByteArray();
                     final var addressBytes = recoverAddressFromPubKey(tmp);
                     assert addressBytes != null;
-                    final var evmAddressBytes = ByteString.copyFrom(addressBytes);
                     ftId.set(registry.getTokenID("vanilla"));
                     partyId.set(registry.getAccountID(PARTY));
-                    partyAlias.set(ByteString.copyFrom(asSolidityAddress(partyId.get())));
-                    counterAlias.set(evmAddressBytes);
+                    partyAlias.set(asSolidityAddress(partyId.get()));
+                    counterAlias.set(addressBytes);
                 }),
                 withOpContext((spec, opLog) -> {
 
                     // account create with key than delete account
+                    final var counterAliasStr = ByteString.copyFrom(counterAlias.get());
                     var accountCreate = cryptoCreate("testAccount")
                             .key(SECP_256K1_SOURCE_KEY)
                             .maxAutomaticTokenAssociations(-1)
-                            .alias(counterAlias.get());
+                            .alias(counterAliasStr);
 
                     var getAccountInfo = getAccountInfo("testAccount")
                             .hasAlreadyUsedAutomaticAssociations(0)
@@ -352,13 +352,13 @@ final Stream<DynamicTest> transferTokensToEVMAddressAliasUnlimitedAssociations()
                     final var hollowAccount = cryptoTransfer(
                                     (s, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                             .setToken(ftId.get())
-                                            .addTransfers(aaWith(s, partyAlias.get(), -500))
-                                            .addTransfers(aaWith(s, counterAlias.get(), +500))))
+                                            .addTransfers(Utils.aaWith(s, partyAlias.get(), -500))
+                                            .addTransfers(Utils.aaWith(s, counterAlias.get(), +500))))
                             .signedBy(DEFAULT_PAYER, PARTY)
                             .via(FT_XFER);
 
                     // verify hollow account
-                    var hollowAccountCreated = getAliasedAccountInfo(counterAlias.get())
+                    var hollowAccountCreated = getAliasedAccountInfo(counterAliasStr)
                             .has(accountWith()
                                     .hasEmptyKey()
                                     .noAlias()
@@ -382,8 +382,8 @@ final Stream<DynamicTest> transferTokensToEVMAddressAliasUnlimitedAssociations()
 
                     // transfer some hbars to the hollow account so that we can pay with it later
                     var hollowAccountTransfer = cryptoTransfer((s, b) -> b.setTransfers(TransferList.newBuilder()
-                                    .addAccountAmounts(aaWith(s, partyAlias.get(), -2 * ONE_HBAR))
-                                    .addAccountAmounts(aaWith(s, counterAlias.get(), +2 * ONE_HBAR))))
+                                    .addAccountAmounts(Utils.aaWith(s, partyAlias.get(), -2 * ONE_HBAR))
+                                    .addAccountAmounts(Utils.aaWith(s, counterAlias.get(), +2 * ONE_HBAR))))
                             .signedBy(DEFAULT_PAYER, PARTY)
                             .via(HBAR_XFER);
 
@@ -404,9 +404,9 @@ final Stream<DynamicTest> transferTokensToEVMAddressAliasUnlimitedAssociations()
     @HapiTest
     final Stream<DynamicTest> transferNftToEVMAddressAliasUnlimitedAssociations() {
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
         final AtomicReference<AccountID> treasuryId = new AtomicReference<>();
-        final AtomicReference<ByteString> counterAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> counterAlias = new AtomicReference<>();
         final AtomicReference<TokenID> nftId = new AtomicReference<>();
 
         return hapiTest(
@@ -430,27 +430,26 @@ final Stream<DynamicTest> transferNftToEVMAddressAliasUnlimitedAssociations() {
                     final var tmp = ecdsaKey.getECDSASecp256K1().toByteArray();
                     final var addressBytes = recoverAddressFromPubKey(tmp);
                     assert addressBytes != null;
-                    final var evmAddressBytes = ByteString.copyFrom(addressBytes);
-                    counterAlias.set(evmAddressBytes);
+                    counterAlias.set(addressBytes);
                     nftId.set(registry.getTokenID(NFT_INFINITE_SUPPLY_TOKEN));
                     partyId.set(registry.getAccountID(PARTY));
                     treasuryId.set(registry.getAccountID(TOKEN_TREASURY));
-                    partyAlias.set(ByteString.copyFrom(asSolidityAddress(partyId.get())));
+                    partyAlias.set(asSolidityAddress(partyId.get()));
                 }),
                 withOpContext((spec, opLog) -> {
 
                     // account create with key than delete account
+                    final var counterAliasStr = ByteString.copyFrom(counterAlias.get());
                     var accountCreate = cryptoCreate("testAccount")
                             .key(SECP_256K1_SOURCE_KEY)
                             .maxAutomaticTokenAssociations(-1)
-                            .alias(counterAlias.get());
+                            .alias(counterAliasStr);
 
                     var getAccountInfo = getAccountInfo("testAccount")
                             .hasAlreadyUsedAutomaticAssociations(0)
                             .has(accountWith().key(SECP_256K1_SOURCE_KEY).maxAutoAssociations(-1));
 
                     var accountDelete = cryptoDelete("testAccount").hasKnownStatus(SUCCESS);
-
                     allRunFor(spec, accountCreate, getAccountInfo, accountDelete);
 
                     /* hollow account created with NFT transfer as expected */
@@ -460,12 +459,12 @@ final Stream<DynamicTest> transferNftToEVMAddressAliasUnlimitedAssociations() {
                                             .addNftTransfers(NftTransfer.newBuilder()
                                                     .setSerialNumber(1L)
                                                     .setSenderAccountID(treasuryId.get())
-                                                    .setReceiverAccountID(asIdWithAlias(counterAlias.get())))))
+                                                    .setReceiverAccountID(asIdWithAlias(counterAliasStr)))))
                             .signedBy(MULTI_KEY, DEFAULT_PAYER, TOKEN_TREASURY)
                             .via(NFT_XFER);
 
                     // verify hollow account
-                    var hollowAccountCreated = getAliasedAccountInfo(counterAlias.get())
+                    var hollowAccountCreated = getAliasedAccountInfo(counterAliasStr)
                             .has(accountWith()
                                     .hasEmptyKey()
                                     .noAlias()
@@ -489,8 +488,8 @@ final Stream<DynamicTest> transferNftToEVMAddressAliasUnlimitedAssociations() {
 
                     // transfer some hbars to the hollow account so that we can pay with it later
                     var hollowAccountTransfer = cryptoTransfer((s, b) -> b.setTransfers(TransferList.newBuilder()
-                                    .addAccountAmounts(aaWith(s, partyAlias.get(), -2 * ONE_HBAR))
-                                    .addAccountAmounts(aaWith(s, counterAlias.get(), +2 * ONE_HBAR))))
+                                    .addAccountAmounts(Utils.aaWith(s, partyAlias.get(), -2 * ONE_HBAR))
+                                    .addAccountAmounts(Utils.aaWith(s, counterAlias.get(), +2 * ONE_HBAR))))
                             .signedBy(DEFAULT_PAYER, PARTY)
                             .via(HBAR_XFER);
 
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCreateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCreateSuite.java
index d4889b2e7daa..ab8fd429e456 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCreateSuite.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCreateSuite.java
@@ -231,7 +231,7 @@ final Stream<DynamicTest> createAnAccountWithStakingFields() {
                 cryptoCreate("invalidStakedAccount")
                         .balance(ONE_HUNDRED_HBARS)
                         .declinedReward(false)
-                        .stakedAccountId("0.0.0")
+                        .stakedAccountId("0")
                         .hasPrecheck(INVALID_STAKING_ID),
                 cryptoCreate("invalidStakedNode")
                         .balance(ONE_HUNDRED_HBARS)
@@ -1024,13 +1024,13 @@ final Stream<DynamicTest> accountsWithDifferentShardOrRealmNotCreated() {
                 cryptoCreate("differentShard")
                         .key(key)
                         .balance(1L)
-                        .shardId(ShardID.newBuilder().setShardNum(1).build())
+                        .shardId(ShardID.newBuilder().setShardNum(3).build())
                         .hasKnownStatus(INVALID_ACCOUNT_ID),
                 // expected realm is 2
                 cryptoCreate("differentRealm")
                         .key(key)
                         .balance(1L)
-                        .realmId(RealmID.newBuilder().setRealmNum(1).build())
+                        .realmId(RealmID.newBuilder().setRealmNum(4).build())
                         .hasKnownStatus(INVALID_ACCOUNT_ID));
     }
 }
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoGetInfoRegression.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoGetInfoRegression.java
index 2e6cdb114c02..bfb76527bc1d 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoGetInfoRegression.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoGetInfoRegression.java
@@ -162,7 +162,7 @@ final Stream<DynamicTest> succeedsNormally() {
                 cryptoCreate("targetWithStakedAccountId")
                         .key("misc")
                         .balance(balance)
-                        .stakedAccountId(stakedAccountId),
+                        .stakedAccountId("20"),
                 getAccountInfo("noStakingTarget")
                         .has(accountWith()
                                 .accountId("noStakingTarget")
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoTransferSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoTransferSuite.java
index da99f25bdff6..f0ce7a34cef8 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoTransferSuite.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoTransferSuite.java
@@ -88,7 +88,7 @@
 import static com.hedera.services.bdd.suites.HapiSuite.TOKEN_TREASURY;
 import static com.hedera.services.bdd.suites.HapiSuite.flattened;
 import static com.hedera.services.bdd.suites.contract.Utils.aaWith;
-import static com.hedera.services.bdd.suites.contract.Utils.accountId;
+import static com.hedera.services.bdd.suites.contract.Utils.accountIdFromEvmAddress;
 import static com.hedera.services.bdd.suites.contract.Utils.captureOneChildCreate2MetaFor;
 import static com.hedera.services.bdd.suites.contract.Utils.mirrorAddrParamFunction;
 import static com.hedera.services.bdd.suites.contract.Utils.mirrorAddrWith;
@@ -117,6 +117,7 @@
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.UNEXPECTED_TOKEN_DECIMALS;
 import static com.hederahashgraph.api.proto.java.TokenType.FUNGIBLE_COMMON;
 import static com.hederahashgraph.api.proto.java.TokenType.NON_FUNGIBLE_UNIQUE;
+import static org.hiero.base.utility.CommonUtils.hex;
 import static org.hiero.base.utility.CommonUtils.unhex;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
@@ -127,6 +128,7 @@
 import com.hedera.services.bdd.spec.HapiSpecSetup;
 import com.hedera.services.bdd.spec.assertions.AccountDetailsAsserts;
 import com.hedera.services.bdd.spec.keys.SigControl;
+import com.hedera.services.bdd.suites.contract.Utils;
 import com.hederahashgraph.api.proto.java.AccountAmount;
 import com.hederahashgraph.api.proto.java.AccountID;
 import com.hederahashgraph.api.proto.java.Key;
@@ -356,8 +358,8 @@ final Stream<DynamicTest> canUseAliasAndAccountCombinations() {
                 cryptoTransfer((spec, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                         .setToken(nftId.get())
                                         .addNftTransfers(ocWith(
-                                                accountId(spec, partyAlias.get()),
-                                                accountId(spec, counterAlias.get()),
+                                                accountIdFromEvmAddress(spec, partyAlias.get()),
+                                                accountIdFromEvmAddress(spec, counterAlias.get()),
                                                 1L)))
                                 .setTransfers(TransferList.newBuilder()
                                         .addAccountAmounts(aaWith(partyId.get(), +2))
@@ -401,8 +403,8 @@ final Stream<DynamicTest> canUseMirrorAliasesForNonContractXfers() {
         final AtomicReference<TokenID> nftId = new AtomicReference<>();
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
         final AtomicReference<AccountID> counterId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> counterAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> counterAlias = new AtomicReference<>();
 
         return hapiTest(
                 newKeyNamed(MULTI_KEY),
@@ -421,48 +423,55 @@ final Stream<DynamicTest> canUseMirrorAliasesForNonContractXfers() {
                     nftId.set(registry.getTokenID(NON_FUNGIBLE_TOKEN));
                     partyId.set(registry.getAccountID(PARTY));
                     counterId.set(registry.getAccountID(COUNTERPARTY));
-                    partyAlias.set(ByteString.copyFrom(asSolidityAddress(partyId.get())));
-                    counterAlias.set(ByteString.copyFrom(asSolidityAddress(counterId.get())));
+                    partyAlias.set(asSolidityAddress(partyId.get()));
+                    counterAlias.set(asSolidityAddress(counterId.get()));
                 }),
                 cryptoTransfer((spec, b) -> b.setTransfers(TransferList.newBuilder()
-                                .addAccountAmounts(aaWith(spec, partyAlias.get(), -1))
+                                .addAccountAmounts(Utils.aaWith(spec, partyAlias.get(), -1))
                                 .addAccountAmounts(aaWith(partyId.get(), -1))
                                 .addAccountAmounts(aaWith(counterId.get(), +2))))
                         .signedBy(DEFAULT_PAYER, PARTY)
                         .hasKnownStatus(ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS),
                 // Check signing requirements aren't distorted by aliases
                 cryptoTransfer((spec, b) -> b.setTransfers(TransferList.newBuilder()
-                                .addAccountAmounts(aaWith(spec, partyAlias.get(), -2))
+                                .addAccountAmounts(Utils.aaWith(spec, partyAlias.get(), -2))
                                 .addAccountAmounts(aaWith(counterId.get(), +2))))
                         .signedBy(DEFAULT_PAYER)
                         .hasKnownStatus(INVALID_SIGNATURE),
                 cryptoTransfer((spec, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                 .setToken(nftId.get())
-                                .addNftTransfers(ocWith(accountId(spec, partyAlias.get()), counterId.get(), 1L))))
+                                .addNftTransfers(ocWith(
+                                        Utils.accountIdWithHexedEvmAddress(
+                                                spec.shard(), spec.realm(), hex(partyAlias.get())),
+                                        counterId.get(),
+                                        1L))))
                         .signedBy(DEFAULT_PAYER)
                         .hasKnownStatus(INVALID_SIGNATURE),
                 cryptoTransfer((spec, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                 .setToken(ftId.get())
-                                .addTransfers(aaWith(spec, partyAlias.get(), -500))
-                                .addTransfers(aaWith(spec, counterAlias.get(), +500))))
+                                .addTransfers(Utils.aaWith(spec, partyAlias.get(), -500))
+                                .addTransfers(Utils.aaWith(spec, counterAlias.get(), +500))))
                         .signedBy(DEFAULT_PAYER)
                         .hasKnownStatus(INVALID_SIGNATURE),
                 // Now do the actual transfers
                 cryptoTransfer((spec, b) -> b.setTransfers(TransferList.newBuilder()
-                                .addAccountAmounts(aaWith(spec, partyAlias.get(), -2))
-                                .addAccountAmounts(aaWith(spec, counterAlias.get(), +2))))
+                                .addAccountAmounts(Utils.aaWith(spec, partyAlias.get(), -2))
+                                .addAccountAmounts(Utils.aaWith(spec, counterAlias.get(), +2))))
                         .signedBy(DEFAULT_PAYER, PARTY)
                         .via(HBAR_XFER),
                 cryptoTransfer((spec, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                 .setToken(nftId.get())
                                 .addNftTransfers(ocWith(
-                                        accountId(spec, partyAlias.get()), accountId(spec, counterAlias.get()), 1L))))
+                                        Utils.accountIdWithHexedEvmAddress(
+                                                spec.shard(), spec.realm(), hex(partyAlias.get())),
+                                        Utils.accountIdWithHexedEvmAddress(spec, hex(counterAlias.get())),
+                                        1L))))
                         .signedBy(DEFAULT_PAYER, PARTY)
                         .via(NFT_XFER),
                 cryptoTransfer((spec, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                 .setToken(ftId.get())
-                                .addTransfers(aaWith(spec, partyAlias.get(), -500))
-                                .addTransfers(aaWith(spec, counterAlias.get(), +500))))
+                                .addTransfers(Utils.aaWith(spec, partyAlias.get(), -500))
+                                .addTransfers(Utils.aaWith(spec, counterAlias.get(), +500))))
                         .signedBy(DEFAULT_PAYER, PARTY)
                         .via(FT_XFER),
                 getTxnRecord(HBAR_XFER),
@@ -548,7 +557,8 @@ final Stream<DynamicTest> canUseEip1014AliasesForXfers() {
                 cryptoTransfer((spec, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                 .setToken(nftId.get())
                                 .addNftTransfers(ocWith(
-                                        accountId(spec.shard(), spec.realm(), partyAliasAddr.get()),
+                                        Utils.accountIdWithHexedEvmAddress(
+                                                spec.shard(), spec.realm(), partyAliasAddr.get()),
                                         counterId.get(),
                                         1L))))
                         .signedBy(DEFAULT_PAYER)
@@ -568,8 +578,8 @@ final Stream<DynamicTest> canUseEip1014AliasesForXfers() {
                 cryptoTransfer((spec, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                 .setToken(nftId.get())
                                 .addNftTransfers(ocWith(
-                                        accountId(spec, partyAliasAddr.get()),
-                                        accountId(spec, counterAliasAddr.get()),
+                                        Utils.accountIdWithHexedEvmAddress(spec, partyAliasAddr.get()),
+                                        Utils.accountIdWithHexedEvmAddress(spec, counterAliasAddr.get()),
                                         1L))))
                         .signedBy(DEFAULT_PAYER, MULTI_KEY)
                         .via(NFT_XFER),
@@ -1240,11 +1250,9 @@ final Stream<DynamicTest> twoComplexKeysRequired() {
     @HapiTest
     final Stream<DynamicTest> specialAccountsBalanceCheck() {
         return hapiTest(IntStream.concat(IntStream.range(1, 101), IntStream.range(900, 1001))
-                .mapToObj(i -> withOpContext((spec, log) -> {
-                    final var balanceOp = getAccountBalance(asEntityString(spec.shard(), spec.realm(), i))
-                            .logged();
-                    allRunFor(spec, balanceOp);
-                }))
+                .mapToObj(i -> withOpContext((spec, log) ->
+                                allRunFor(spec, getAccountBalance(asEntityString(spec.shard(), spec.realm(), i))))
+                        .logged())
                 .toArray(HapiSpecOperation[]::new));
     }
 
@@ -1761,8 +1769,8 @@ final Stream<DynamicTest> createHollowAccountWithNftTransferAndCompleteIt() {
                         cryptoTransfer((s, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                         .setToken(tokenIdA.get())
                                         .addNftTransfers(ocWith(
-                                                accountId(spec, treasuryAlias.get()),
-                                                accountId(spec, hollowAccountAlias.get()),
+                                                accountIdFromEvmAddress(spec, treasuryAlias.get()),
+                                                accountIdFromEvmAddress(spec, hollowAccountAlias.get()),
                                                 1L))))
                                 .payingWith(TREASURY)
                                 .signedBy(TREASURY)
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoUpdateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoUpdateSuite.java
index df0bf70e5e87..f0ba8c27163b 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoUpdateSuite.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoUpdateSuite.java
@@ -238,10 +238,7 @@ final Stream<DynamicTest> updateStakingFieldsWorks() {
         final var stakedAccountId = 20;
         return hapiTest(
                 newKeyNamed(ADMIN_KEY),
-                cryptoCreate("user")
-                        .key(ADMIN_KEY)
-                        .stakedAccountId(stakedAccountId)
-                        .declinedReward(true),
+                cryptoCreate("user").key(ADMIN_KEY).stakedAccountId(20).declinedReward(true),
                 getAccountInfo("user")
                         .has(accountWith()
                                 .stakedAccountId(stakedAccountId)
@@ -254,10 +251,7 @@ final Stream<DynamicTest> updateStakingFieldsWorks() {
                 cryptoUpdate("user").newStakedNodeId(-25L).hasKnownStatus(INVALID_STAKING_ID),
                 getAccountInfo("user")
                         .has(accountWith().noStakedAccountId().noStakingNodeId().isDeclinedReward(false)),
-                cryptoUpdate("user")
-                        .key(ADMIN_KEY)
-                        .newStakedAccountId(stakedAccountId)
-                        .newDeclinedReward(true),
+                cryptoUpdate("user").key(ADMIN_KEY).newStakedAccountId("20").newDeclinedReward(true),
                 getAccountInfo("user")
                         .has(accountWith()
                                 .stakedAccountId(stakedAccountId)
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/HollowAccountFinalizationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/HollowAccountFinalizationSuite.java
index c765f802267a..6f5df967ab76 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/HollowAccountFinalizationSuite.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/HollowAccountFinalizationSuite.java
@@ -46,7 +46,6 @@
 import static com.hedera.services.bdd.suites.HapiSuite.SECP_256K1_SOURCE_KEY;
 import static com.hedera.services.bdd.suites.HapiSuite.THREE_MONTHS_IN_SECONDS;
 import static com.hedera.services.bdd.suites.HapiSuite.flattened;
-import static com.hedera.services.bdd.suites.contract.Utils.aaWith;
 import static com.hedera.services.bdd.suites.contract.hapi.ContractUpdateSuite.ADMIN_KEY;
 import static com.hedera.services.bdd.suites.crypto.AutoCreateUtils.createHollowAccountFrom;
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.CONTRACT_REVERT_EXECUTED;
@@ -65,6 +64,7 @@
 import com.hedera.services.bdd.spec.queries.crypto.HapiGetAccountInfo;
 import com.hedera.services.bdd.spec.queries.meta.HapiGetTxnRecord;
 import com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer;
+import com.hedera.services.bdd.suites.contract.Utils;
 import com.hederahashgraph.api.proto.java.AccountID;
 import com.hederahashgraph.api.proto.java.Key;
 import com.hederahashgraph.api.proto.java.TokenID;
@@ -149,8 +149,8 @@ final Stream<DynamicTest> hollowAccountCompletionWithTokenTransfer() {
         final var fungibleToken = "fungibleToken";
         final AtomicReference<TokenID> ftId = new AtomicReference<>();
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> counterAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> counterAlias = new AtomicReference<>();
 
         return hapiTest(
                 newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE),
@@ -161,23 +161,23 @@ final Stream<DynamicTest> hollowAccountCompletionWithTokenTransfer() {
                     final var ecdsaKey = registry.getKey(SECP_256K1_SOURCE_KEY);
                     final var tmp = ecdsaKey.getECDSASecp256K1().toByteArray();
                     final var addressBytes = recoverAddressFromPubKey(tmp);
-                    final var evmAddressBytes = ByteString.copyFrom(addressBytes);
                     ftId.set(registry.getTokenID(fungibleToken));
                     partyId.set(registry.getAccountID(PARTY));
-                    partyAlias.set(ByteString.copyFrom(asSolidityAddress(partyId.get())));
-                    counterAlias.set(evmAddressBytes);
+                    partyAlias.set(asSolidityAddress(partyId.get()));
+                    counterAlias.set(addressBytes);
                 }),
                 withOpContext((spec, opLog) -> {
                     /* hollow account created with fungible token transfer as expected */
                     final var cryptoTransferWithLazyCreate = cryptoTransfer(
                                     (s, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                             .setToken(ftId.get())
-                                            .addTransfers(aaWith(s, partyAlias.get(), -500))
-                                            .addTransfers(aaWith(s, counterAlias.get(), +500))))
+                                            .addTransfers(Utils.aaWith(s, partyAlias.get(), -500))
+                                            .addTransfers(Utils.aaWith(s, counterAlias.get(), +500))))
                             .signedBy(DEFAULT_PAYER, PARTY)
                             .via(FT_XFER);
 
-                    final var getHollowAccountInfoAfterCreation = getAliasedAccountInfo(counterAlias.get())
+                    final var getHollowAccountInfoAfterCreation = getAliasedAccountInfo(
+                                    ByteString.copyFrom(counterAlias.get()))
                             .hasToken(relationshipWith(fungibleToken).balance(500))
                             .has(accountWith()
                                     .hasEmptyKey()
@@ -199,20 +199,20 @@ final Stream<DynamicTest> hollowAccountCompletionWithTokenTransfer() {
                     spec.registry().saveAccountId(SECP_256K1_SOURCE_KEY, newAccountID);
                 }),
                 withOpContext((spec, opLog) -> {
-                    final var hbarTransfer = cryptoTransfer(
-                                    tinyBarsFromTo(PARTY, counterAlias.get(), ONE_HUNDRED_HBARS))
+                    final var counterAliasStr = ByteString.copyFrom(counterAlias.get());
+                    final var hbarTransfer = cryptoTransfer(tinyBarsFromTo(PARTY, counterAliasStr, ONE_HUNDRED_HBARS))
                             .hasKnownStatus(SUCCESS)
                             .via(TRANSFER_TXN_2);
 
                     /* complete hollow account creation with fungible token transfer */
                     final var fungibleTokenTransfer = cryptoTransfer(
-                                    moving(5, fungibleToken).between(PARTY, counterAlias.get()))
+                                    moving(5, fungibleToken).between(PARTY, counterAliasStr))
                             .payingWith(SECP_256K1_SOURCE_KEY)
                             .sigMapPrefixes(uniqueWithFullPrefixesFor(SECP_256K1_SOURCE_KEY))
                             .via(TRANSFER_TXN_2);
 
                     final var cryptoCreateWithEVMAddress = cryptoCreate(PARTY)
-                            .alias(counterAlias.get())
+                            .alias(counterAliasStr)
                             .hasPrecheck(INVALID_ALIAS_KEY)
                             .balance(ONE_HBAR);
 
@@ -221,7 +221,7 @@ final Stream<DynamicTest> hollowAccountCompletionWithTokenTransfer() {
                             .hasPrecheck(INVALID_ALIAS_KEY)
                             .balance(ONE_HBAR);
 
-                    final var getCompletedHollowAccountInfo = getAliasedAccountInfo(counterAlias.get())
+                    final var getCompletedHollowAccountInfo = getAliasedAccountInfo(counterAliasStr)
                             .hasToken(relationshipWith(fungibleToken).balance(505))
                             .has(accountWith().key(SECP_256K1_SOURCE_KEY).noAlias());
 
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/QueryPaymentSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/QueryPaymentSuite.java
index 4652736a8531..a817c9b7c5e6 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/QueryPaymentSuite.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/QueryPaymentSuite.java
@@ -40,20 +40,20 @@ final Stream<DynamicTest> queryPaymentsFailsWithInsufficientFunds() {
                 cryptoCreate("c").balance(1_234L),
                 cryptoCreate("d").balance(1_234L),
                 getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec ->
-                                        multiAccountPaymentToNode003AndBeneficiary(spec, "a", "b", "c", 1_000L, 2L))
+                        .withPayment(cryptoTransfer(innerSpec -> multiAccountPaymentToNode003AndBeneficiary(
+                                        innerSpec, "a", "b", "c", 1_000L, 2L))
                                 .payingWith("a"))
                         .setNode(NODE)
                         .hasAnswerOnlyPrecheck(INSUFFICIENT_TX_FEE),
                 getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec ->
-                                        multiAccountPaymentToNode003AndBeneficiary(spec, "d", "b", "c", 5000, 200L))
+                        .withPayment(cryptoTransfer(innerSpec -> multiAccountPaymentToNode003AndBeneficiary(
+                                        innerSpec, "d", "b", "c", 5000, 200L))
                                 .payingWith("a"))
                         .setNode(NODE)
                         .hasAnswerOnlyPrecheck(INSUFFICIENT_PAYER_BALANCE),
                 getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec ->
-                                        multiAccountPaymentToNode003AndBeneficiary(spec, "d", GENESIS, "c", 5000, 200L))
+                        .withPayment(cryptoTransfer(innerSpec -> multiAccountPaymentToNode003AndBeneficiary(
+                                        innerSpec, "d", GENESIS, "c", 5000, 200L))
                                 .payingWith("a"))
                         .setNode(NODE)
                         .hasAnswerOnlyPrecheck(INSUFFICIENT_PAYER_BALANCE));
@@ -72,19 +72,19 @@ final Stream<DynamicTest> queryPaymentsMultiBeneficiarySucceeds() {
                 cryptoCreate("b").balance(1_234L),
                 cryptoCreate("c").balance(1_234L),
                 getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(
-                                spec -> multiAccountPaymentToNode003AndBeneficiary(spec, "a", "b", "c", 1_000L, 200L)))
+                        .withPayment(cryptoTransfer(innerSpec ->
+                                multiAccountPaymentToNode003AndBeneficiary(innerSpec, "a", "b", "c", 1_000L, 200L)))
                         .setNode(NODE)
                         .hasAnswerOnlyPrecheck(OK),
                 getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(
-                                spec -> multiAccountPaymentToNode003AndBeneficiary(spec, "a", "b", "c", 900, 200L)))
+                        .withPayment(cryptoTransfer(innerSpec ->
+                                multiAccountPaymentToNode003AndBeneficiary(innerSpec, "a", "b", "c", 900, 200L)))
                         .setNode(NODE)
                         .payingWith("a")
                         .hasAnswerOnlyPrecheck(OK),
                 getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(
-                                spec -> multiAccountPaymentToNode003AndBeneficiary(spec, "a", "b", "c", 1200, 200L)))
+                        .withPayment(cryptoTransfer(innerSpec ->
+                                multiAccountPaymentToNode003AndBeneficiary(innerSpec, "a", "b", "c", 1200, 200L)))
                         .setNode(NODE)
                         .payingWith("a")
                         .fee(10L)
@@ -105,7 +105,8 @@ final Stream<DynamicTest> queryPaymentsSingleBeneficiaryChecked() {
                         .setNode(NODE)
                         .hasAnswerOnlyPrecheck(INSUFFICIENT_PAYER_BALANCE),
                 getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec -> multiAccountPaymentToNode003(spec, "a", "b", 1_000L)))
+                        .withPayment(
+                                cryptoTransfer(innerSpec -> multiAccountPaymentToNode003(innerSpec, "a", "b", 1_000L)))
                         .hasAnswerOnlyPrecheck(OK));
     }
 
@@ -117,7 +118,7 @@ final Stream<DynamicTest> queryPaymentsNotToNodeFails() {
                 cryptoCreate("b").balance(1_234L),
                 cryptoCreate("c").balance(1_234L),
                 getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec -> invalidPaymentToNode(spec, "a", "b", "c", 1200))
+                        .withPayment(cryptoTransfer(innerSpec -> invalidPaymentToNode(innerSpec, "a", "b", "c", 1200))
                                 .payingWith("a"))
                         .setNode(NODE)
                         .fee(10L)
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip904/AirdropsDisabledTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip904/AirdropsDisabledTest.java
index 87cb623d4d2d..8be5da79a50f 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip904/AirdropsDisabledTest.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip904/AirdropsDisabledTest.java
@@ -40,7 +40,6 @@
 import static com.hedera.services.bdd.suites.HapiSuite.ONE_HUNDRED_HBARS;
 import static com.hedera.services.bdd.suites.HapiSuite.TOKEN_TREASURY;
 import static com.hedera.services.bdd.suites.HapiSuite.flattened;
-import static com.hedera.services.bdd.suites.contract.Utils.aaWith;
 import static com.hedera.services.bdd.suites.contract.Utils.captureChildCreate2MetaFor;
 import static com.hedera.services.bdd.suites.contract.Utils.captureOneChildCreate2MetaFor;
 import static com.hedera.services.bdd.suites.contract.hapi.ContractUpdateSuite.ADMIN_KEY;
@@ -77,6 +76,7 @@
 import com.hedera.services.bdd.spec.HapiSpecOperation;
 import com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer;
 import com.hedera.services.bdd.spec.utilops.CustomSpecAssert;
+import com.hedera.services.bdd.suites.contract.Utils;
 import com.hederahashgraph.api.proto.java.AccountID;
 import com.hederahashgraph.api.proto.java.TokenID;
 import com.hederahashgraph.api.proto.java.TokenSupplyType;
@@ -92,7 +92,6 @@
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
-import org.hiero.base.utility.CommonUtils;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.DisplayName;
 import org.junit.jupiter.api.DynamicTest;
@@ -155,19 +154,23 @@ final Stream<DynamicTest> canMergeCreate2MultipleCreatesWithHollowAccount() {
         final AtomicReference<TokenID> ftId = new AtomicReference<>();
         final AtomicReference<TokenID> nftId = new AtomicReference<>();
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
 
         return hapiTest(
                 newKeyNamed(adminKey),
                 newKeyNamed(MULTI_KEY),
                 uploadInitCode(contract),
-                contractCreate(contract)
-                        .payingWith(GENESIS)
-                        .adminKey(adminKey)
-                        .entityMemo(ENTITY_MEMO)
-                        .gas(10_000_000L)
-                        .via(CREATE_2_TXN)
-                        .exposingNumTo(num -> factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num))),
+                withOpContext((spec, opLog) -> {
+                    final var op = contractCreate(contract)
+                            .payingWith(GENESIS)
+                            .adminKey(adminKey)
+                            .entityMemo(ENTITY_MEMO)
+                            .gas(10_000_000L)
+                            .via(CREATE_2_TXN)
+                            .exposingNumTo(num -> factoryEvmAddress.set(
+                                    asHexedSolidityAddress((int) spec.shard(), spec.realm(), num)));
+                    allRunFor(spec, op);
+                }),
                 cryptoCreate(PARTY).maxAutomaticTokenAssociations(2),
                 tokenCreate(A_TOKEN)
                         .tokenType(FUNGIBLE_COMMON)
@@ -266,19 +269,23 @@ final Stream<DynamicTest> canMergeCreate2ChildWithHollowAccountFungibleTransfers
         }
 
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
 
         final int givenOpsSize = 6;
         HapiSpecOperation[] givenOps = new HapiSpecOperation[givenOpsSize + (fungibleTransfersSize * 2)];
         givenOps[0] = newKeyNamed(adminKey);
         givenOps[1] = newKeyNamed(MULTI_KEY);
         givenOps[2] = uploadInitCode(contract);
-        givenOps[3] = contractCreate(contract)
-                .payingWith(GENESIS)
-                .adminKey(adminKey)
-                .entityMemo(ENTITY_MEMO)
-                .via(CREATE_2_TXN)
-                .exposingNumTo(num -> factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num)));
+        givenOps[3] = withOpContext((spec, opLog) -> {
+            final var op = contractCreate(contract)
+                    .payingWith(GENESIS)
+                    .adminKey(adminKey)
+                    .entityMemo(ENTITY_MEMO)
+                    .via(CREATE_2_TXN)
+                    .exposingNumTo(num ->
+                            factoryEvmAddress.set(asHexedSolidityAddress((int) spec.shard(), spec.realm(), num)));
+            allRunFor(spec, op);
+        });
         givenOps[4] = cryptoCreate(PARTY).maxAutomaticTokenAssociations(2);
         givenOps[5] = setIdentifiers(Optional.empty(), Optional.empty(), Optional.of(partyId), Optional.of(partyAlias));
 
@@ -471,18 +478,22 @@ final Stream<DynamicTest> canMergeCreate2ChildWithHollowAccount() {
         final AtomicReference<TokenID> ftId = new AtomicReference<>();
         final AtomicReference<TokenID> nftId = new AtomicReference<>();
         final AtomicReference<AccountID> partyId = new AtomicReference<>();
-        final AtomicReference<ByteString> partyAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> partyAlias = new AtomicReference<>();
 
         return hapiTest(
                 newKeyNamed(adminKey),
                 newKeyNamed(MULTI_KEY),
                 uploadInitCode(contract),
-                contractCreate(contract)
-                        .payingWith(GENESIS)
-                        .adminKey(adminKey)
-                        .entityMemo(ENTITY_MEMO)
-                        .via(CREATE_2_TXN)
-                        .exposingNumTo(num -> factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num))),
+                withOpContext((spec, opLog) -> {
+                    final var op = contractCreate(contract)
+                            .payingWith(GENESIS)
+                            .adminKey(adminKey)
+                            .entityMemo(ENTITY_MEMO)
+                            .via(CREATE_2_TXN)
+                            .exposingNumTo(num -> factoryEvmAddress.set(
+                                    asHexedSolidityAddress((int) spec.shard(), spec.realm(), num)));
+                    allRunFor(spec, op);
+                }),
                 cryptoCreate(PARTY).maxAutomaticTokenAssociations(2),
                 tokenCreate(A_TOKEN)
                         .tokenType(FUNGIBLE_COMMON)
@@ -558,16 +569,13 @@ private HapiCryptoTransfer lazyCreateAccountWithFungibleTransfers(
             String creation,
             AtomicReference<String> expectedCreate2Address,
             AtomicReference<TokenID> ftIds[],
-            AtomicReference<ByteString> partyAlias) {
+            AtomicReference<byte[]> partyAlias) {
         return cryptoTransfer((spec, b) -> {
                     for (AtomicReference<TokenID> ftId : ftIds) {
                         b.addTokenTransfers(TokenTransferList.newBuilder()
                                 .setToken(ftId.get())
-                                .addTransfers(aaWith(spec, partyAlias.get(), -500))
-                                .addTransfers(aaWith(
-                                        spec,
-                                        ByteString.copyFrom(CommonUtils.unhex(expectedCreate2Address.get())),
-                                        +500)));
+                                .addTransfers(Utils.aaWith(spec, partyAlias.get(), -500))
+                                .addTransfers(Utils.aaWith(spec, expectedCreate2Address.get(), +500)));
                     }
                 })
                 .signedBy(DEFAULT_PAYER, PARTY)
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip904/AirdropsFeatureFlagTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip904/AirdropsFeatureFlagTest.java
index b4d590169e83..fd73ef4e7b4b 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip904/AirdropsFeatureFlagTest.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip904/AirdropsFeatureFlagTest.java
@@ -21,15 +21,14 @@
 import static com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext;
 import static com.hedera.services.bdd.suites.HapiSuite.ONE_HBAR;
 import static com.hedera.services.bdd.suites.HapiSuite.SECP_256K1_SHAPE;
-import static com.hedera.services.bdd.suites.contract.Utils.aaWith;
 import static com.hedera.services.bdd.suites.crypto.CryptoDeleteSuite.TREASURY;
 import static com.hedera.services.bdd.suites.regression.factories.IdFuzzingProviderFactory.FUNGIBLE_TOKEN;
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS;
 import static com.hederahashgraph.api.proto.java.TokenType.FUNGIBLE_COMMON;
 
-import com.google.protobuf.ByteString;
 import com.hedera.services.bdd.junit.LeakyHapiTest;
 import com.hedera.services.bdd.spec.queries.meta.HapiGetTxnRecord;
+import com.hedera.services.bdd.suites.contract.Utils;
 import com.hederahashgraph.api.proto.java.TokenID;
 import com.hederahashgraph.api.proto.java.TokenTransferList;
 import com.hederahashgraph.api.proto.java.TransferList;
@@ -47,8 +46,8 @@ public class AirdropsFeatureFlagTest {
             overrides = {"entities.unlimitedAutoAssociationsEnabled"})
     final Stream<DynamicTest> createHollowAccountOnDeletedAliasViaHBARTransferAndCompleteIt() {
         final var hollowAccountKey = "hollowAccountKey";
-        final AtomicReference<ByteString> treasuryAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> hollowAccountAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> treasuryAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> hollowAccountAlias = new AtomicReference<>();
         final var transferHBARSToHollowAccountTxn = "transferHBARSToHollowAccountTxn";
         return hapiTest(
                 overriding("entities.unlimitedAutoAssociationsEnabled", "false"),
@@ -57,20 +56,19 @@ final Stream<DynamicTest> createHollowAccountOnDeletedAliasViaHBARTransferAndCom
                 withOpContext((spec, opLog) -> {
                     final var registry = spec.registry();
                     final var treasuryAccountId = registry.getAccountID(TREASURY);
-                    treasuryAlias.set(ByteString.copyFrom(asSolidityAddress(treasuryAccountId)));
+                    treasuryAlias.set(asSolidityAddress(treasuryAccountId));
                     // Save the alias for the hollow account
                     final var ecdsaKey = spec.registry()
                             .getKey(hollowAccountKey)
                             .getECDSASecp256K1()
                             .toByteArray();
-                    final var evmAddressBytes = ByteString.copyFrom(recoverAddressFromPubKey(ecdsaKey));
-                    hollowAccountAlias.set(evmAddressBytes);
+                    hollowAccountAlias.set(recoverAddressFromPubKey(ecdsaKey));
                 }),
                 withOpContext((spec, opLog) -> {
                     // Create a hollow account
                     var hollowCreate = cryptoTransfer((s, b) -> b.setTransfers(TransferList.newBuilder()
-                                    .addAccountAmounts(aaWith(s, treasuryAlias.get(), -3 * ONE_HBAR))
-                                    .addAccountAmounts(aaWith(s, hollowAccountAlias.get(), +3 * ONE_HBAR))))
+                                    .addAccountAmounts(Utils.aaWith(s, treasuryAlias.get(), -3 * ONE_HBAR))
+                                    .addAccountAmounts(Utils.aaWith(s, hollowAccountAlias.get(), +3 * ONE_HBAR))))
                             .payingWith(TREASURY)
                             .signedBy(TREASURY)
                             .via(transferHBARSToHollowAccountTxn);
@@ -104,8 +102,8 @@ final Stream<DynamicTest> createHollowAccountOnDeletedAliasViaHBARTransferAndCom
 
                     // Create hollow account with the deleted account alias
                     var hollowCreate2 = cryptoTransfer((s, b) -> b.setTransfers(TransferList.newBuilder()
-                                    .addAccountAmounts(aaWith(s, treasuryAlias.get(), -2 * ONE_HBAR))
-                                    .addAccountAmounts(aaWith(s, hollowAccountAlias.get(), +2 * ONE_HBAR))))
+                                    .addAccountAmounts(Utils.aaWith(s, treasuryAlias.get(), -2 * ONE_HBAR))
+                                    .addAccountAmounts(Utils.aaWith(s, hollowAccountAlias.get(), +2 * ONE_HBAR))))
                             .payingWith(TREASURY)
                             .signedBy(TREASURY)
                             .via(transferHBARSToHollowAccountTxn);
@@ -139,8 +137,8 @@ final Stream<DynamicTest> createHollowAccountOnDeletedAliasViaHBARTransferAndCom
     final Stream<DynamicTest> createHollowAccountOnDeletedAliasViaFtTransferAndCompleteIt() {
         final var hollowAccountKey = "hollowAccountKey";
         final AtomicReference<TokenID> fungibleTokenId = new AtomicReference<>();
-        final AtomicReference<ByteString> treasuryAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> hollowAccountAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> treasuryAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> hollowAccountAlias = new AtomicReference<>();
         final var transferFtToHollowAccountTxn = "transferFtToHollowAccountTxn";
         return hapiTest(
                 overriding("entities.unlimitedAutoAssociationsEnabled", "false"),
@@ -153,21 +151,20 @@ final Stream<DynamicTest> createHollowAccountOnDeletedAliasViaFtTransferAndCompl
                 withOpContext((spec, opLog) -> {
                     final var registry = spec.registry();
                     final var treasuryAccountId = registry.getAccountID(TREASURY);
-                    treasuryAlias.set(ByteString.copyFrom(asSolidityAddress(treasuryAccountId)));
+                    treasuryAlias.set(asSolidityAddress(treasuryAccountId));
                     // Save the alias for the hollow account
                     final var ecdsaKey = spec.registry()
                             .getKey(hollowAccountKey)
                             .getECDSASecp256K1()
                             .toByteArray();
-                    final var evmAddressBytes = ByteString.copyFrom(recoverAddressFromPubKey(ecdsaKey));
-                    hollowAccountAlias.set(evmAddressBytes);
+                    hollowAccountAlias.set(recoverAddressFromPubKey(ecdsaKey));
                     fungibleTokenId.set(registry.getTokenID(FUNGIBLE_TOKEN));
                 }),
                 withOpContext((spec, opLog) -> {
                     // Create a hollow account
                     var hollowCreate = cryptoTransfer((s, b) -> b.setTransfers(TransferList.newBuilder()
-                                    .addAccountAmounts(aaWith(s, treasuryAlias.get(), -3 * ONE_HBAR))
-                                    .addAccountAmounts(aaWith(s, hollowAccountAlias.get(), +3 * ONE_HBAR))))
+                                    .addAccountAmounts(Utils.aaWith(s, treasuryAlias.get(), -3 * ONE_HBAR))
+                                    .addAccountAmounts(Utils.aaWith(s, hollowAccountAlias.get(), +3 * ONE_HBAR))))
                             .payingWith(TREASURY)
                             .signedBy(TREASURY)
                             .via(transferFtToHollowAccountTxn);
@@ -202,8 +199,8 @@ final Stream<DynamicTest> createHollowAccountOnDeletedAliasViaFtTransferAndCompl
                     // Create hollow account with the deleted account alias
                     var hollowCreate2 = cryptoTransfer((s, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                     .setToken(fungibleTokenId.get())
-                                    .addTransfers(aaWith(s, treasuryAlias.get(), -1))
-                                    .addTransfers(aaWith(s, hollowAccountAlias.get(), +1))))
+                                    .addTransfers(Utils.aaWith(s, treasuryAlias.get(), -1))
+                                    .addTransfers(Utils.aaWith(s, hollowAccountAlias.get(), +1))))
                             .payingWith(TREASURY)
                             .signedBy(TREASURY)
                             .via(transferFtToHollowAccountTxn);
diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip904/UnlimitedAutoAssociationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip904/UnlimitedAutoAssociationSuite.java
index 9d940f5d7715..7e405a091cfb 100644
--- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip904/UnlimitedAutoAssociationSuite.java
+++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip904/UnlimitedAutoAssociationSuite.java
@@ -34,8 +34,7 @@
 import static com.hedera.services.bdd.suites.HapiSuite.ONE_HUNDRED_HBARS;
 import static com.hedera.services.bdd.suites.HapiSuite.SECP_256K1_SHAPE;
 import static com.hedera.services.bdd.suites.HapiSuite.TINY_PARTS_PER_WHOLE;
-import static com.hedera.services.bdd.suites.contract.Utils.aaWith;
-import static com.hedera.services.bdd.suites.contract.Utils.accountId;
+import static com.hedera.services.bdd.suites.contract.Utils.accountIdFromEvmAddress;
 import static com.hedera.services.bdd.suites.contract.Utils.ocWith;
 import static com.hedera.services.bdd.suites.crypto.CryptoApproveAllowanceSuite.FUNGIBLE_TOKEN;
 import static com.hedera.services.bdd.suites.crypto.CryptoApproveAllowanceSuite.NON_FUNGIBLE_TOKEN;
@@ -58,6 +57,7 @@
 import com.hedera.services.bdd.spec.dsl.entities.SpecAccount;
 import com.hedera.services.bdd.spec.dsl.entities.SpecContract;
 import com.hedera.services.bdd.spec.dsl.entities.SpecNonFungibleToken;
+import com.hedera.services.bdd.suites.contract.Utils;
 import com.hederahashgraph.api.proto.java.TokenID;
 import com.hederahashgraph.api.proto.java.TokenTransferList;
 import com.hederahashgraph.api.proto.java.TokenType;
@@ -242,8 +242,8 @@ final Stream<DynamicTest> createHollowAccountWithFtTransfer() {
         final var hollowKey = "hollowKey";
         final AtomicReference<TokenID> tokenIdA = new AtomicReference<>();
         final AtomicReference<TokenID> tokenIdB = new AtomicReference<>();
-        final AtomicReference<ByteString> treasuryAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> hollowAccountAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> treasuryAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> hollowAccountAlias = new AtomicReference<>();
         final var hollowAccountTxn = "hollowAccountTxn";
         return hapiTest(
                 newKeyNamed(hollowKey).shape(SECP_256K1_SHAPE),
@@ -259,27 +259,26 @@ final Stream<DynamicTest> createHollowAccountWithFtTransfer() {
                 withOpContext((spec, opLog) -> {
                     final var registry = spec.registry();
                     final var treasuryAccountId = registry.getAccountID(TREASURY);
-                    treasuryAlias.set(ByteString.copyFrom(asSolidityAddress(treasuryAccountId)));
+                    treasuryAlias.set(asSolidityAddress(treasuryAccountId));
 
                     // Save the alias for the hollow account
                     final var ecdsaKey = spec.registry()
                             .getKey(hollowKey)
                             .getECDSASecp256K1()
                             .toByteArray();
-                    final var evmAddressBytes = ByteString.copyFrom(recoverAddressFromPubKey(ecdsaKey));
-                    hollowAccountAlias.set(evmAddressBytes);
+                    hollowAccountAlias.set(recoverAddressFromPubKey(ecdsaKey));
                     tokenIdA.set(registry.getTokenID(tokenA));
                     tokenIdB.set(registry.getTokenID(tokenB));
                 }),
                 // Create hollow account with 2 token transfers
                 cryptoTransfer((s, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                         .setToken(tokenIdA.get())
-                                        .addTransfers(aaWith(s, treasuryAlias.get(), -1))
-                                        .addTransfers(aaWith(s, hollowAccountAlias.get(), +1)))
+                                        .addTransfers(Utils.aaWith(s, treasuryAlias.get(), -1))
+                                        .addTransfers(Utils.aaWith(s, hollowAccountAlias.get(), +1)))
                                 .addTokenTransfers(TokenTransferList.newBuilder()
                                         .setToken(tokenIdB.get())
-                                        .addTransfers(aaWith(s, treasuryAlias.get(), -1))
-                                        .addTransfers(aaWith(s, hollowAccountAlias.get(), +1))))
+                                        .addTransfers(Utils.aaWith(s, treasuryAlias.get(), -1))
+                                        .addTransfers(Utils.aaWith(s, hollowAccountAlias.get(), +1))))
                         .payingWith(TREASURY)
                         .signedBy(TREASURY)
                         .via(hollowAccountTxn),
@@ -317,8 +316,8 @@ final Stream<DynamicTest> createHollowAccountWithNftTransfer() {
         final var hollowTransferTxn = "hollowTransferTxn";
         final AtomicReference<TokenID> tokenIdA = new AtomicReference<>();
         final AtomicReference<TokenID> tokenIdB = new AtomicReference<>();
-        final AtomicReference<ByteString> treasuryAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> hollowAccountAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> treasuryAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> hollowAccountAlias = new AtomicReference<>();
         return hapiTest(
                 newKeyNamed(hollowAccountKey).shape(SECP_256K1_SHAPE),
                 newKeyNamed(MULTI_KEY),
@@ -338,15 +337,14 @@ final Stream<DynamicTest> createHollowAccountWithNftTransfer() {
                 withOpContext((spec, opLog) -> {
                     final var registry = spec.registry();
                     final var treasuryAccountId = registry.getAccountID(TREASURY);
-                    treasuryAlias.set(ByteString.copyFrom(asSolidityAddress(treasuryAccountId)));
+                    treasuryAlias.set(asSolidityAddress(treasuryAccountId));
 
                     // Save the alias for the hollow account
                     final var ecdsaKey = spec.registry()
                             .getKey(hollowAccountKey)
                             .getECDSASecp256K1()
                             .toByteArray();
-                    final var evmAddressBytes = ByteString.copyFrom(recoverAddressFromPubKey(ecdsaKey));
-                    hollowAccountAlias.set(evmAddressBytes);
+                    hollowAccountAlias.set(recoverAddressFromPubKey(ecdsaKey));
                     tokenIdA.set(registry.getTokenID(tokenA));
                     tokenIdB.set(registry.getTokenID(tokenB));
                 }),
@@ -361,7 +359,7 @@ final Stream<DynamicTest> createHollowAccountWithNftTransfer() {
                         cryptoCreate("testAccount")
                                 .key(hollowAccountKey)
                                 .maxAutomaticTokenAssociations(-1)
-                                .alias(hollowAccountAlias.get()),
+                                .alias(ByteString.copyFrom(hollowAccountAlias.get())),
                         // Verify maxAutomaticAssociations is set to -1 and there is no auto association
                         getAccountInfo("testAccount")
                                 .hasAlreadyUsedAutomaticAssociations(0)
@@ -372,14 +370,18 @@ final Stream<DynamicTest> createHollowAccountWithNftTransfer() {
                         cryptoTransfer((s, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                                 .setToken(tokenIdA.get())
                                                 .addNftTransfers(ocWith(
-                                                        accountId(s, treasuryAlias.get()),
-                                                        accountId(s, hollowAccountAlias.get()),
+                                                        accountIdFromEvmAddress(
+                                                                s, ByteString.copyFrom(treasuryAlias.get())),
+                                                        accountIdFromEvmAddress(
+                                                                s, ByteString.copyFrom(hollowAccountAlias.get())),
                                                         1L)))
                                         .addTokenTransfers(TokenTransferList.newBuilder()
                                                 .setToken(tokenIdB.get())
                                                 .addNftTransfers(ocWith(
-                                                        accountId(s, treasuryAlias.get()),
-                                                        accountId(s, hollowAccountAlias.get()),
+                                                        accountIdFromEvmAddress(
+                                                                s, ByteString.copyFrom(treasuryAlias.get())),
+                                                        accountIdFromEvmAddress(
+                                                                s, ByteString.copyFrom(hollowAccountAlias.get())),
                                                         1L))))
                                 .payingWith(TREASURY)
                                 .signedBy(TREASURY)
@@ -412,9 +414,9 @@ final Stream<DynamicTest> createHollowAccountWithMultipleSenders() {
         final var transfersToHollowAccountTxn = "transfersToHollowAccountTxn";
         final AtomicReference<TokenID> tokenIdA = new AtomicReference<>();
         final AtomicReference<TokenID> tokenIdB = new AtomicReference<>();
-        final AtomicReference<ByteString> aliceAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> bobAlias = new AtomicReference<>();
-        final AtomicReference<ByteString> carolHollowAccountAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> aliceAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> bobAlias = new AtomicReference<>();
+        final AtomicReference<byte[]> carolHollowAccountAlias = new AtomicReference<>();
         final double expectedCryptoTransferAndAssociationUsd =
                 expectedCreateHollowAccountFee + 2 * transferFee + 2 * expectedFeeForOneAssociation;
 
@@ -436,14 +438,13 @@ final Stream<DynamicTest> createHollowAccountWithMultipleSenders() {
                         .treasury(BOB),
                 withOpContext((spec, opLog) -> {
                     final var registry = spec.registry();
-                    aliceAlias.set(ByteString.copyFrom(asSolidityAddress(registry.getAccountID(ALICE))));
-                    bobAlias.set(ByteString.copyFrom(asSolidityAddress(registry.getAccountID(BOB))));
+                    aliceAlias.set(asSolidityAddress(registry.getAccountID(ALICE)));
+                    bobAlias.set(asSolidityAddress(registry.getAccountID(BOB)));
 
                     // Save the alias for the hollow account
                     final var ecdsaKey =
                             spec.registry().getKey(CAROL).getECDSASecp256K1().toByteArray();
-                    final var evmAddressBytes = ByteString.copyFrom(recoverAddressFromPubKey(ecdsaKey));
-                    carolHollowAccountAlias.set(evmAddressBytes);
+                    carolHollowAccountAlias.set(recoverAddressFromPubKey(ecdsaKey));
                     tokenIdA.set(registry.getTokenID(FUNGIBLE_TOKEN));
                     tokenIdB.set(registry.getTokenID(NON_FUNGIBLE_TOKEN));
                 }),
@@ -454,13 +455,14 @@ final Stream<DynamicTest> createHollowAccountWithMultipleSenders() {
                         // Transfer both tokens to hollow account with different senders.
                         cryptoTransfer((s, b) -> b.addTokenTransfers(TokenTransferList.newBuilder()
                                                 .setToken(tokenIdA.get())
-                                                .addTransfers(aaWith(s, aliceAlias.get(), -1))
-                                                .addTransfers(aaWith(s, carolHollowAccountAlias.get(), +1)))
+                                                .addTransfers(Utils.aaWith(s, aliceAlias.get(), -1))
+                                                .addTransfers(Utils.aaWith(s, carolHollowAccountAlias.get(), +1)))
                                         .addTokenTransfers(TokenTransferList.newBuilder()
                                                 .setToken(tokenIdB.get())
                                                 .addNftTransfers(ocWith(
-                                                        accountId(s, bobAlias.get()),
-                                                        accountId(s, carolHollowAccountAlias.get()),
+                                                        accountIdFromEvmAddress(s, ByteString.copyFrom(bobAlias.get())),
+                                                        accountIdFromEvmAddress(
+                                                                s, ByteString.copyFrom(carolHollowAccountAlias.get())),
                                                         1L))))
                                 .payingWith(ALICE)
                                 .signedBy(ALICE, BOB)


Reviews:
user: login: ibankov
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T09:18:51Z
user: login: JivkoKelchev
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T12:08:29Z
user: login: ibankov
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T12:42:01Z
user: login: mhess-swl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T15:08:22Z
user: login: mhess-swl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T15:09:16Z
user: login: mhess-swl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T15:11:08Z
user: login: mhess-swl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T15:11:24Z
user: login: mhess-swl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T20:16:41Z
user: login: mhess-swl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T20:25:42Z
user: login: mhess-swl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T20:26:05Z
user: login: mhess-swl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T20:26:19Z
user: login: ibankov
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-15T11:30:02Z
user: login: mhess-swl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-15T14:14:28Z
user: login: ibankov
body: LGTM
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T15:15:38Z

Review comments:
diff_hunk: @@ -192,24 +193,28 @@ final Stream<DynamicTest> deleteEcdsaKeyAliasWorked() {
         return hapiTest(
                 createHip32Auto(1, SECP_256K1_SHAPE, i -> ACCOUNT_TO_BE_DELETED),
                 balanceSnapshot("before", ACCOUNT_TO_BE_DELETED),
-                withAddressOfKey(
-                        ACCOUNT_TO_BE_DELETED,
-                        address -> cryptoTransfer((spec, builder) -> builder.setTransfers(TransferList.newBuilder()
-                                .addAccountAmounts(AccountAmount.newBuilder()
-                                        .setAccountID(AccountID.newBuilder()
-                                                .setShardNum(shard)
-                                                .setRealmNum(realm)
-                                                .setAccountNum(2))
-                                        .setAmount(-ONE_HUNDRED_HBARS)
-                                        .build())
-                                .addAccountAmounts(AccountAmount.newBuilder()
-                                        .setAccountID(AccountID.newBuilder()
-                                                .setShardNum(shard)
-                                                .setRealmNum(realm)
-                                                .setAlias(ByteString.copyFrom(explicitBytesOf(address))))
-                                        .setAmount(ONE_HUNDRED_HBARS)
-                                        .build())
-                                .build()))),
+                withOpContext((spec, opLog) -> {
+                    final var op = withAddressOfKey(
+                            ACCOUNT_TO_BE_DELETED,
+                            address -> cryptoTransfer((innerSpec, builder) ->
+                                    builder.setTransfers(TransferList.newBuilder()
+                                            .addAccountAmounts(AccountAmount.newBuilder()
+                                                    .setAccountID(AccountID.newBuilder()
+                                                            .setShardNum(shard)
+                                                            .setRealmNum(realm)
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoDeleteSuite.java
user: login: ibankov
body: wasn't the idea of `withOpContext` to use `spec.shard()` and `spec.realm()` here?
created_at: 2025-05-14T09:18:51Z
author_association: CONTRIBUTOR
diff_hunk: @@ -197,9 +198,15 @@ final Stream<DynamicTest> inlineCreate2CanFailSafely() {
 
         return hapiTest(
                 uploadInitCode(contract),
-                contractCreate(contract).payingWith(GENESIS).via(CREATION).exposingNumTo(num -> {
-                    factoryEntityNum.set(num);
-                    factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num));
+                withOpContext((spec, opLog) -> {
+                    final var op = contractCreate(contract)
+                            .payingWith(GENESIS)
+                            .via(CREATION)
+                            .exposingNumTo(num -> {
+                                factoryEntityNum.set(num);
+                                factoryEvmAddress.set(asHexedSolidityAddress((int) spec.shard(), spec.realm(), num));
+                            });
+                    allRunFor(spec, op);
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationSuite.java
user: login: JivkoKelchev
body: This is one way to do it, and I'm fine.

FYI, In my previous [PR](https://github.com/hiero-ledger/hiero-consensus-node/pull/19077/files#diff-6dd791fe16d945338ae627820f6f328a4c49e5494c005528ab1df070d4bc9224R90-R93) I added `exposingContracIdTo`. You can use it and there will be no need to add `withOpContext`. (In general I'm trying to avoid adding `withOpContext` if it is possible)
created_at: 2025-05-14T11:08:47Z
author_association: CONTRIBUTOR
diff_hunk: @@ -321,19 +326,29 @@ public static NftTransfer ocWith(final AccountID from, final AccountID to, final
                 .build();
     }
 
-    public static AccountID accountId(HapiSpec spec, final String hexedEvmAddress) {
-        return accountId(spec.shard(), spec.realm(), hexedEvmAddress);
+    public static AccountID accountIdWithHexedEvmAddress(HapiSpec spec, final String hexedEvmAddress) {
+        return accountIdWithHexedEvmAddress(spec.shard(), spec.realm(), hexedEvmAddress);
     }
 
-    public static AccountID accountId(final long shard, final long realm, final String hexedEvmAddress) {
+    public static AccountID accountIdWithHexedEvmAddress(
+            final long shard, final long realm, final String hexedEvmAddress) {
         return AccountID.newBuilder()
                 .setShardNum(shard)
                 .setRealmNum(realm)
                 .setAlias(ByteString.copyFrom(unhex(hexedEvmAddress)))
                 .build();
     }
 
-    public static AccountID accountId(HapiSpec spec, final ByteString evmAddress) {
+    @Deprecated
+    public static AccountID accountIdFromEvmAddress(final ByteString evmAddress) {
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/Utils.java
user: login: JivkoKelchev
body: I'm confused, why do you introduce this deprecated method and not use it anywhere?
created_at: 2025-05-14T11:21:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -192,24 +193,28 @@ final Stream<DynamicTest> deleteEcdsaKeyAliasWorked() {
         return hapiTest(
                 createHip32Auto(1, SECP_256K1_SHAPE, i -> ACCOUNT_TO_BE_DELETED),
                 balanceSnapshot("before", ACCOUNT_TO_BE_DELETED),
-                withAddressOfKey(
-                        ACCOUNT_TO_BE_DELETED,
-                        address -> cryptoTransfer((spec, builder) -> builder.setTransfers(TransferList.newBuilder()
-                                .addAccountAmounts(AccountAmount.newBuilder()
-                                        .setAccountID(AccountID.newBuilder()
-                                                .setShardNum(shard)
-                                                .setRealmNum(realm)
-                                                .setAccountNum(2))
-                                        .setAmount(-ONE_HUNDRED_HBARS)
-                                        .build())
-                                .addAccountAmounts(AccountAmount.newBuilder()
-                                        .setAccountID(AccountID.newBuilder()
-                                                .setShardNum(shard)
-                                                .setRealmNum(realm)
-                                                .setAlias(ByteString.copyFrom(explicitBytesOf(address))))
-                                        .setAmount(ONE_HUNDRED_HBARS)
-                                        .build())
-                                .build()))),
+                withOpContext((spec, opLog) -> {
+                    final var op = withAddressOfKey(
+                            ACCOUNT_TO_BE_DELETED,
+                            address -> cryptoTransfer((innerSpec, builder) ->
+                                    builder.setTransfers(TransferList.newBuilder()
+                                            .addAccountAmounts(AccountAmount.newBuilder()
+                                                    .setAccountID(AccountID.newBuilder()
+                                                            .setShardNum(shard)
+                                                            .setRealmNum(realm)
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoDeleteSuite.java
user: login: JivkoKelchev
body: Also, can't you use the `innerSpec` instead of adding one more? 🤔 
created_at: 2025-05-14T11:34:32Z
author_association: CONTRIBUTOR
diff_hunk: @@ -40,24 +42,33 @@ final Stream<DynamicTest> queryPaymentsFailsWithInsufficientFunds() {
                 cryptoCreate("b").balance(1_234L),
                 cryptoCreate("c").balance(1_234L),
                 cryptoCreate("d").balance(1_234L),
-                getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec ->
-                                        multiAccountPaymentToNode003AndBeneficiary(spec, "a", "b", "c", 1_000L, 2L))
-                                .payingWith("a"))
-                        .setNode(NODE)
-                        .hasAnswerOnlyPrecheck(INSUFFICIENT_TX_FEE),
-                getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec ->
-                                        multiAccountPaymentToNode003AndBeneficiary(spec, "d", "b", "c", 5000, 200L))
-                                .payingWith("a"))
-                        .setNode(NODE)
-                        .hasAnswerOnlyPrecheck(INSUFFICIENT_PAYER_BALANCE),
-                getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec ->
-                                        multiAccountPaymentToNode003AndBeneficiary(spec, "d", GENESIS, "c", 5000, 200L))
-                                .payingWith("a"))
-                        .setNode(NODE)
-                        .hasAnswerOnlyPrecheck(INSUFFICIENT_PAYER_BALANCE));
+                withOpContext((spec, opLog) -> {
+                    final var op = getAccountInfo(GENESIS)
+                            .withPayment(cryptoTransfer(innerSpec -> multiAccountPaymentToNode003AndBeneficiary(
+                                            innerSpec, "a", "b", "c", 1_000L, 2L))
+                                    .payingWith("a"))
+                            .setNode(spec.shard(), spec.realm(), NODE_ACCT_NUM)
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/QueryPaymentSuite.java
user: login: JivkoKelchev
body: I think `setNode` can omit the shard and realm when we define the operations, and we can populate them using the `spec` on submission. (just like the other entity IDs)
We already did it like this for transactions.
I also did it [here](https://github.com/hiero-ledger/hiero-consensus-node/pull/19123/files#diff-ad4fd2150d09d24e5f77a1e36a1da40218e32ffa5378d7c0ba69728c8e1256baR436-R437) for the queries. 
created_at: 2025-05-14T11:57:07Z
author_association: CONTRIBUTOR
diff_hunk: @@ -433,13 +434,13 @@ public T useEmptyTxnAsAnswerPayment() {
         return self();
     }
 
-    public T setNode(String account) {
-        node = Optional.of(HapiPropertySource.asAccount(account));
+    public T setNode(long shard, long realm, long account) {
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/queries/HapiQueryOp.java
user: login: ibankov
body: Implemented this way, every time you want to set `nodeId` on a query you have to do it `withOpContext`, you can check how we handled it in `HapiTxnOp`
created_at: 2025-05-14T12:42:00Z
author_association: CONTRIBUTOR
diff_hunk: @@ -321,19 +326,29 @@ public static NftTransfer ocWith(final AccountID from, final AccountID to, final
                 .build();
     }
 
-    public static AccountID accountId(HapiSpec spec, final String hexedEvmAddress) {
-        return accountId(spec.shard(), spec.realm(), hexedEvmAddress);
+    public static AccountID accountIdWithHexedEvmAddress(HapiSpec spec, final String hexedEvmAddress) {
+        return accountIdWithHexedEvmAddress(spec.shard(), spec.realm(), hexedEvmAddress);
     }
 
-    public static AccountID accountId(final long shard, final long realm, final String hexedEvmAddress) {
+    public static AccountID accountIdWithHexedEvmAddress(
+            final long shard, final long realm, final String hexedEvmAddress) {
         return AccountID.newBuilder()
                 .setShardNum(shard)
                 .setRealmNum(realm)
                 .setAlias(ByteString.copyFrom(unhex(hexedEvmAddress)))
                 .build();
     }
 
-    public static AccountID accountId(HapiSpec spec, final ByteString evmAddress) {
+    @Deprecated
+    public static AccountID accountIdFromEvmAddress(final ByteString evmAddress) {
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/Utils.java
user: login: mhess-swl
body: Purely to confuse everyone 😄 kidding, not sure where this came from, will remove. Thanks! 
created_at: 2025-05-14T15:08:22Z
author_association: CONTRIBUTOR
diff_hunk: @@ -192,24 +193,28 @@ final Stream<DynamicTest> deleteEcdsaKeyAliasWorked() {
         return hapiTest(
                 createHip32Auto(1, SECP_256K1_SHAPE, i -> ACCOUNT_TO_BE_DELETED),
                 balanceSnapshot("before", ACCOUNT_TO_BE_DELETED),
-                withAddressOfKey(
-                        ACCOUNT_TO_BE_DELETED,
-                        address -> cryptoTransfer((spec, builder) -> builder.setTransfers(TransferList.newBuilder()
-                                .addAccountAmounts(AccountAmount.newBuilder()
-                                        .setAccountID(AccountID.newBuilder()
-                                                .setShardNum(shard)
-                                                .setRealmNum(realm)
-                                                .setAccountNum(2))
-                                        .setAmount(-ONE_HUNDRED_HBARS)
-                                        .build())
-                                .addAccountAmounts(AccountAmount.newBuilder()
-                                        .setAccountID(AccountID.newBuilder()
-                                                .setShardNum(shard)
-                                                .setRealmNum(realm)
-                                                .setAlias(ByteString.copyFrom(explicitBytesOf(address))))
-                                        .setAmount(ONE_HUNDRED_HBARS)
-                                        .build())
-                                .build()))),
+                withOpContext((spec, opLog) -> {
+                    final var op = withAddressOfKey(
+                            ACCOUNT_TO_BE_DELETED,
+                            address -> cryptoTransfer((innerSpec, builder) ->
+                                    builder.setTransfers(TransferList.newBuilder()
+                                            .addAccountAmounts(AccountAmount.newBuilder()
+                                                    .setAccountID(AccountID.newBuilder()
+                                                            .setShardNum(shard)
+                                                            .setRealmNum(realm)
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoDeleteSuite.java
user: login: mhess-swl
body: Yes and yes, wasn't thinking here. Will do!
created_at: 2025-05-14T15:09:16Z
author_association: CONTRIBUTOR
diff_hunk: @@ -197,9 +198,15 @@ final Stream<DynamicTest> inlineCreate2CanFailSafely() {
 
         return hapiTest(
                 uploadInitCode(contract),
-                contractCreate(contract).payingWith(GENESIS).via(CREATION).exposingNumTo(num -> {
-                    factoryEntityNum.set(num);
-                    factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num));
+                withOpContext((spec, opLog) -> {
+                    final var op = contractCreate(contract)
+                            .payingWith(GENESIS)
+                            .via(CREATION)
+                            .exposingNumTo(num -> {
+                                factoryEntityNum.set(num);
+                                factoryEvmAddress.set(asHexedSolidityAddress((int) spec.shard(), spec.realm(), num));
+                            });
+                    allRunFor(spec, op);
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationSuite.java
user: login: mhess-swl
body: Ahh yes, I like that better, let's do that!
created_at: 2025-05-14T15:11:08Z
author_association: CONTRIBUTOR
diff_hunk: @@ -433,13 +434,13 @@ public T useEmptyTxnAsAnswerPayment() {
         return self();
     }
 
-    public T setNode(String account) {
-        node = Optional.of(HapiPropertySource.asAccount(account));
+    public T setNode(long shard, long realm, long account) {
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/queries/HapiQueryOp.java
user: login: mhess-swl
body: Will take a look, thanks!
created_at: 2025-05-14T15:11:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -433,13 +434,13 @@ public T useEmptyTxnAsAnswerPayment() {
         return self();
     }
 
-    public T setNode(String account) {
-        node = Optional.of(HapiPropertySource.asAccount(account));
+    public T setNode(long shard, long realm, long account) {
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/queries/HapiQueryOp.java
user: login: mhess-swl
body: Agreed, fixed!
created_at: 2025-05-14T20:16:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -197,9 +198,15 @@ final Stream<DynamicTest> inlineCreate2CanFailSafely() {
 
         return hapiTest(
                 uploadInitCode(contract),
-                contractCreate(contract).payingWith(GENESIS).via(CREATION).exposingNumTo(num -> {
-                    factoryEntityNum.set(num);
-                    factoryEvmAddress.set(asHexedSolidityAddress(0, 0, num));
+                withOpContext((spec, opLog) -> {
+                    final var op = contractCreate(contract)
+                            .payingWith(GENESIS)
+                            .via(CREATION)
+                            .exposingNumTo(num -> {
+                                factoryEntityNum.set(num);
+                                factoryEvmAddress.set(asHexedSolidityAddress((int) spec.shard(), spec.realm(), num));
+                            });
+                    allRunFor(spec, op);
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationSuite.java
user: login: mhess-swl
body: Done!
created_at: 2025-05-14T20:25:42Z
author_association: CONTRIBUTOR
diff_hunk: @@ -321,19 +326,29 @@ public static NftTransfer ocWith(final AccountID from, final AccountID to, final
                 .build();
     }
 
-    public static AccountID accountId(HapiSpec spec, final String hexedEvmAddress) {
-        return accountId(spec.shard(), spec.realm(), hexedEvmAddress);
+    public static AccountID accountIdWithHexedEvmAddress(HapiSpec spec, final String hexedEvmAddress) {
+        return accountIdWithHexedEvmAddress(spec.shard(), spec.realm(), hexedEvmAddress);
     }
 
-    public static AccountID accountId(final long shard, final long realm, final String hexedEvmAddress) {
+    public static AccountID accountIdWithHexedEvmAddress(
+            final long shard, final long realm, final String hexedEvmAddress) {
         return AccountID.newBuilder()
                 .setShardNum(shard)
                 .setRealmNum(realm)
                 .setAlias(ByteString.copyFrom(unhex(hexedEvmAddress)))
                 .build();
     }
 
-    public static AccountID accountId(HapiSpec spec, final ByteString evmAddress) {
+    @Deprecated
+    public static AccountID accountIdFromEvmAddress(final ByteString evmAddress) {
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/Utils.java
user: login: mhess-swl
body: Fixed
created_at: 2025-05-14T20:26:05Z
author_association: CONTRIBUTOR
diff_hunk: @@ -40,24 +42,33 @@ final Stream<DynamicTest> queryPaymentsFailsWithInsufficientFunds() {
                 cryptoCreate("b").balance(1_234L),
                 cryptoCreate("c").balance(1_234L),
                 cryptoCreate("d").balance(1_234L),
-                getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec ->
-                                        multiAccountPaymentToNode003AndBeneficiary(spec, "a", "b", "c", 1_000L, 2L))
-                                .payingWith("a"))
-                        .setNode(NODE)
-                        .hasAnswerOnlyPrecheck(INSUFFICIENT_TX_FEE),
-                getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec ->
-                                        multiAccountPaymentToNode003AndBeneficiary(spec, "d", "b", "c", 5000, 200L))
-                                .payingWith("a"))
-                        .setNode(NODE)
-                        .hasAnswerOnlyPrecheck(INSUFFICIENT_PAYER_BALANCE),
-                getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec ->
-                                        multiAccountPaymentToNode003AndBeneficiary(spec, "d", GENESIS, "c", 5000, 200L))
-                                .payingWith("a"))
-                        .setNode(NODE)
-                        .hasAnswerOnlyPrecheck(INSUFFICIENT_PAYER_BALANCE));
+                withOpContext((spec, opLog) -> {
+                    final var op = getAccountInfo(GENESIS)
+                            .withPayment(cryptoTransfer(innerSpec -> multiAccountPaymentToNode003AndBeneficiary(
+                                            innerSpec, "a", "b", "c", 1_000L, 2L))
+                                    .payingWith("a"))
+                            .setNode(spec.shard(), spec.realm(), NODE_ACCT_NUM)
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/QueryPaymentSuite.java
user: login: mhess-swl
body: Yes agreed, fixed!
created_at: 2025-05-14T20:26:19Z
author_association: CONTRIBUTOR
diff_hunk: @@ -98,15 +100,19 @@ final Stream<DynamicTest> queryPaymentsSingleBeneficiaryChecked() {
                 cryptoCreate("a").balance(500_000_000L),
                 cryptoCreate("b").balance(1_234L),
                 cryptoCreate("c").balance(1_234L),
-                getAccountInfo(GENESIS).fee(100L).setNode(NODE).hasAnswerOnlyPrecheck(OK),
-                getAccountInfo(GENESIS)
-                        .payingWith("a")
-                        .nodePayment(Long.MAX_VALUE)
-                        .setNode(NODE)
-                        .hasAnswerOnlyPrecheck(INSUFFICIENT_PAYER_BALANCE),
-                getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec -> multiAccountPaymentToNode003(spec, "a", "b", 1_000L)))
-                        .hasAnswerOnlyPrecheck(OK));
+                withOpContext((spec, opLog) -> {
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/QueryPaymentSuite.java
user: login: ibankov
body: I don't think you need this withOpContext anymore
created_at: 2025-05-15T11:30:02Z
author_association: CONTRIBUTOR
diff_hunk: @@ -98,15 +100,19 @@ final Stream<DynamicTest> queryPaymentsSingleBeneficiaryChecked() {
                 cryptoCreate("a").balance(500_000_000L),
                 cryptoCreate("b").balance(1_234L),
                 cryptoCreate("c").balance(1_234L),
-                getAccountInfo(GENESIS).fee(100L).setNode(NODE).hasAnswerOnlyPrecheck(OK),
-                getAccountInfo(GENESIS)
-                        .payingWith("a")
-                        .nodePayment(Long.MAX_VALUE)
-                        .setNode(NODE)
-                        .hasAnswerOnlyPrecheck(INSUFFICIENT_PAYER_BALANCE),
-                getAccountInfo(GENESIS)
-                        .withPayment(cryptoTransfer(spec -> multiAccountPaymentToNode003(spec, "a", "b", 1_000L)))
-                        .hasAnswerOnlyPrecheck(OK));
+                withOpContext((spec, opLog) -> {
path: hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/QueryPaymentSuite.java
user: login: mhess-swl
body: Good catch. Fixed, thanks!
created_at: 2025-05-15T14:14:28Z
author_association: CONTRIBUTOR

PR comments:
user: login: codecov[bot]
created_at: 2025-05-15T16:01:22Z
body: ## [Codecov](https://app.codecov.io/gh/hiero-ledger/hiero-consensus-node/pull/19147?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hiero-ledger) Report
All modified and coverable lines are covered by tests :white_check_mark:

[![Impacted file tree graph](https://app.codecov.io/gh/hiero-ledger/hiero-consensus-node/pull/19147/graphs/tree.svg?width=650&height=150&src=pr&token=oCfwLn4U3e&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hiero-ledger)](https://app.codecov.io/gh/hiero-ledger/hiero-consensus-node/pull/19147?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hiero-ledger)

```diff
@@            Coverage Diff            @@
##               main   #19147   +/-   ##
=========================================
  Coverage     69.35%   69.35%           
- Complexity    23270    23271    +1     
=========================================
  Files          2647     2647           
  Lines        100731   100731           
  Branches      10409    10409           
=========================================
+ Hits          69862    69864    +2     
+ Misses        26907    26905    -2     
  Partials       3962     3962           
```

[see 1 file with indirect coverage changes](https://app.codecov.io/gh/hiero-ledger/hiero-consensus-node/pull/19147/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hiero-ledger)

[![Impacted file tree graph](https://app.codecov.io/gh/hiero-ledger/hiero-consensus-node/pull/19147/graphs/tree.svg?width=650&height=150&src=pr&token=oCfwLn4U3e&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hiero-ledger)](https://app.codecov.io/gh/hiero-ledger/hiero-consensus-node/pull/19147?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hiero-ledger)

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
author_association: NONE
user: login: codacy-production[bot]
created_at: 2025-05-15T16:01:25Z
body: ## Coverage summary from Codacy
### [See diff coverage on Codacy](https://app.codacy.com/gh/hiero-ledger/hiero-consensus-node/pull-requests/19147/coverage?utm_source=github.com&utm_medium=coverageSummary&utm_campaign=coverageSummaryPullRequest)

 | Coverage variation | Diff coverage | 
 | ------------- | ------------- |
 | :white_check_mark: **+0.00%** (target: -1.00%) | :white_check_mark: **∅** |

<details>
<summary>Coverage variation details</summary>

| | Coverable lines | Covered lines | Coverage |
| ------------- | ------------- | ------------- | ------------- |
| Common ancestor commit (78deca47e9790417fee4f71c83d758548256d112) | 100681 | 73794 | 73.29% | |
| Head commit (715b13074b4328a83b2b4858135818a774cddbac) | 100681 (+0) | 73796 (+2) | 73.30% (**+0.00%**) |

**Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: `<coverage of head commit> - <coverage of common ancestor commit>`
</details>

<details>
<summary>Diff coverage details</summary>

| | Coverable lines | Covered lines | Diff coverage |
| ------------- | ------------- | ------------- | ------------- |
| Pull request (#19147) | 0 | 0 | **∅ (not applicable)** |

**Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `<covered lines added or modified>/<coverable lines added or modified> * 100%`
</details>

#### [See your quality gate settings](https://app.codacy.com/gh/hiero-ledger/hiero-consensus-node/settings/quality?utm_source=github.com&utm_medium=coverageSummary&utm_campaign=coverageSummaryGates)&nbsp;&nbsp;&nbsp;&nbsp;[Change summary preferences](https://app.codacy.com/gh/hiero-ledger/hiero-consensus-node/settings/integrations?utm_source=github.com&utm_medium=coverageSummary&utm_campaign=coverageSummarySettings)

<!-- 108f945d-e553-4918-8ccf-027c6d4acc2c -->
author_association: NONE