1414import com .hedera .hashgraph .sdk .Client ;
1515import com .hedera .hashgraph .sdk .ContractFunctionParameters ;
1616import com .hedera .hashgraph .sdk .ContractId ;
17- import com .hedera .hashgraph .sdk .LedgerId ;
1817import com .hedera .hashgraph .sdk .MirrorNodeContractEstimateGasQuery ;
1918import com .hedera .hashgraph .sdk .SubscriptionHandle ;
2019import com .hedera .hashgraph .sdk .TokenId ;
8079import org .hiero .mirror .test .e2e .acceptance .config .AcceptanceTestProperties ;
8180import org .hiero .mirror .test .e2e .acceptance .config .RestJavaProperties ;
8281import org .hiero .mirror .test .e2e .acceptance .config .Web3Properties ;
83- import org .hiero .mirror .test .e2e .acceptance .props .ExpandedAccountId ;
8482import org .hiero .mirror .test .e2e .acceptance .props .Order ;
8583import org .hiero .mirror .test .e2e .acceptance .steps .AbstractFeature .ContractMethodInterface ;
8684import org .hiero .mirror .test .e2e .acceptance .util .TestUtil ;
@@ -105,16 +103,13 @@ public class MirrorNodeClient {
105103 private final Web3Properties web3Properties ;
106104 private final Supplier <Boolean > partialStateSupplier = Suppliers .memoize (this ::computeHasPartialState );
107105 private final Client queryClient ;
108- private final ExpandedAccountId defaultOperator ;
109106
110107 public MirrorNodeClient (
111108 AcceptanceTestProperties acceptanceTestProperties ,
112109 RestClient .Builder restClientBuilder ,
113110 RestJavaProperties restJavaProperties ,
114111 Web3Properties web3Properties )
115112 throws InterruptedException , URISyntaxException {
116- defaultOperator = new ExpandedAccountId (
117- acceptanceTestProperties .getOperatorId (), acceptanceTestProperties .getOperatorKey ());
118113 this .acceptanceTestProperties = acceptanceTestProperties ;
119114 this .restClient = restClientBuilder .build ();
120115 this .restJavaClient = StringUtils .isBlank (restJavaProperties .getBaseUrl ())
@@ -724,21 +719,7 @@ private Client createClient() throws InterruptedException, URISyntaxException {
724719 ? web3Properties .getEndpoint ()
725720 : acceptanceTestProperties .getRestProperties ().getEndpoint ();
726721
727- LedgerId ledgerId =
728- resolveLedgerId (acceptanceTestProperties .getNetwork ().name ());
722+ var ledgerId = acceptanceTestProperties .getNetwork ().getLedgerId ();
729723 return Client .forNetwork (Map .of ()).setMirrorNetwork (List .of (endpoint )).setLedgerId (ledgerId );
730724 }
731-
732- private LedgerId resolveLedgerId (String networkName ) {
733- String normalized = networkName .toLowerCase ();
734-
735- switch (normalized ) {
736- case "mainnet" :
737- case "testnet" :
738- case "previewnet" :
739- return LedgerId .fromString (normalized );
740- default :
741- return null ;
742- }
743- }
744725}
0 commit comments