Skip to content

Commit b3806e1

Browse files
chore: Add --inside-batch option to accounts send (#19141)
Signed-off-by: Michael Tinker <[email protected]>
1 parent fb1e41a commit b3806e1

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

hedera-node/test-clients/src/yahcli/java/com/hedera/services/yahcli/commands/accounts/SendCommand.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ public class SendCommand implements Callable<Integer> {
5454
description = "for an HTS token denomination, the number of decimals")
5555
Integer decimals;
5656

57+
@CommandLine.Option(
58+
names = {"--inside-batch"},
59+
paramLabel = "<AtomicBatch?>",
60+
defaultValue = "false",
61+
description = "whether to send the transfer inside a batch")
62+
Boolean insideBatch;
63+
5764
@Override
5865
public Integer call() throws Exception {
5966
var config = ConfigUtils.configFrom(accountsCommand.getYahcli());
@@ -79,7 +86,8 @@ public Integer call() throws Exception {
7986
amount,
8087
effectiveMemo,
8188
denomination,
82-
accountsCommand.getYahcli().isScheduled());
89+
accountsCommand.getYahcli().isScheduled(),
90+
insideBatch);
8391
delegate.runSuiteSync();
8492

8593
final var firstSpec = delegate.getFinalSpecs().getFirst();

hedera-node/test-clients/src/yahcli/java/com/hedera/services/yahcli/suites/SendSuite.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// SPDX-License-Identifier: Apache-2.0
22
package com.hedera.services.yahcli.suites;
33

4+
import static com.hedera.services.bdd.spec.transactions.TxnVerbs.atomicBatch;
5+
46
import com.hedera.services.bdd.spec.HapiSpec;
57
import com.hedera.services.bdd.spec.SpecOperation;
68
import com.hedera.services.bdd.spec.props.MapPropertySource;
@@ -29,6 +31,7 @@ public class SendSuite extends HapiSuite {
2931
private final String denomination;
3032

3133
private final boolean schedule;
34+
private final boolean batch;
3235
private final long unitsToSend;
3336

3437
public SendSuite(
@@ -37,13 +40,15 @@ public SendSuite(
3740
final long unitsToSend,
3841
final String memo,
3942
@Nullable final String denomination,
40-
final boolean schedule) {
43+
final boolean schedule,
44+
final boolean batch) {
4145
this.memo = memo;
4246
this.configManager = configManager;
4347
this.beneficiary = beneficiary;
4448
this.unitsToSend = unitsToSend;
4549
this.denomination = denomination;
4650
this.schedule = schedule;
51+
this.batch = batch;
4752
}
4853

4954
@Override
@@ -71,6 +76,9 @@ final Stream<DynamicTest> doSend() {
7176
if (schedule) {
7277
transfer = TxnVerbs.scheduleCreate("original", transfer).logged();
7378
}
79+
if (batch) {
80+
transfer = atomicBatch(transfer.batchKey(DEFAULT_PAYER));
81+
}
7482

7583
final var spec = new HapiSpec(
7684
"DoSend", new MapPropertySource(configManager.asSpecConfig()), new SpecOperation[] {transfer});

hedera-node/test-clients/yahcli/run/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -eo pipefail
33

4-
TAG=${1:-'0.7.3'}
4+
TAG=${1:-'0.7.4'}
55
SCRIPT_SOURCE="${BASH_SOURCE[0]}"
66

77
READLINK_OPTS=""

hedera-node/test-clients/yahcli/run/publish.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -eo pipefail
33

4-
TAG=${1:-'0.7.3'}
4+
TAG=${1:-'0.7.4'}
55
SCRIPT_SOURCE="${BASH_SOURCE[0]}"
66

77
READLINK_OPTS=""
@@ -25,5 +25,5 @@ cd "${SCRIPT_PATH}/.."
2525
rm -f assets/yahcli.jar >/dev/null 2>&1 || true
2626
cp -f yahcli.jar assets/
2727

28-
docker buildx create --use --name "multiarchASDF"
28+
docker buildx create --use --name "multiarch074b"
2929
docker buildx build --push --platform linux/amd64,linux/arm64 -t gcr.io/hedera-registry/yahcli:$TAG .

0 commit comments

Comments
 (0)