hiero-ledger / hiero-ledger/hiero-sdk-cpp
[Beginner]: Add HIP-1313 high-volume entity creation example to `src/sdk/examples/`
- Dominant language
- C++
- Stars
- 42
- Forks
- 108
- Avg merge
- 11h 45m
- Merged PRs (30d)
- 2
Description
### 🐥 Beginner Friendly
This issue is a great fit for contributors who are ready to explore the Hiero C++ codebase a little more and take on slightly more independent work.
Beginner Issues often involve reading existing C++ code, understanding how different parts of the SDK fit together, and making small, thoughtful updates that follow established patterns.
The goal is to support skill growth while keeping the experience approachable, well-scoped, and enjoyable.
> [!IMPORTANT]
> ### 🐥 About Beginner Issues
>
> Beginner Issues are a great next step for contributors who feel comfortable with the basic project workflow and want to explore the codebase a little more.
>
> These issues often involve:
> - Reading existing C++ code
> - Understanding how different parts of the SDK fit together
> - Making small, thoughtful updates that follow established patterns
>
> You'll usually see Beginner Issues focused on things like:
> - Small, well-scoped improvements to existing tests
> - Narrow updates to `src` functionality (e.g. refining helpers or improving readability)
> - Documentation or comment clarity
> - Enhancements to existing examples
>
> Other types of contributions — such as brand-new features, broader system changes, or deeper technical work — are just as valuable and may use different labels.
### 👾 Description of the Task
PR #1521 implemented the SDK side of HIP-1313 (high-volume entity creation), but did not add the example program described in the HIP-1313 design doc. The closing issue (#1129) explicitly required an example in `src/sdk/examples/` and the maintainer flagged this gap on approval.
> Maintainer comment on PR #1521: *"the design doc specifies an example that isn't added here. Could you open an issue to add this and a contributor could potentially add it?"*
Relevant files:
```
src/sdk/examples/ (new example file goes here)
src/sdk/examples/CMakeLists.txt
```
There are ~71 existing examples in `src/sdk/examples/`. None demonstrates high-volume entity creation.
### 💡 Proposed Approach
Add a new standalone example program (one `.cc` file) that demonstrates the HIP-1313 high-volume creation flow against the testnet. Use an existing single-file example as a template — `CreateAccountExample.cc` is a good starting point because it is the simplest "create entity" example.
The example should:
1. Build a `Client` configured for testnet using the same operator-config helper other examples use.
2. Create a meaningful number of entities (suggested: 50–100 accounts in a single high-volume request, since that is the headline scenario in the HIP-1313 spec).
3. Print a brief progress report (entity IDs + timing) so a reader can see the speedup vs. issuing one request per entity.
4. Tear down anything it needs to clean up so re-running the example is safe.
### 👩💻 Implementation Steps
- [ ] Read the HIP-1313 design doc and the closed issue [#1129](https://github.com/hiero-ledger/hiero-sdk-cpp/issues/1129) for the intended scope of the example.
- [ ] Read [src/sdk/examples/CreateAccountExample.cc](../../src/sdk/examples/CreateAccountExample.cc) (or another minimal example) to learn the established example shape: `main()`, operator config, `Client` setup, error handling, output style.
- [ ] Create `src/sdk/examples/HighVolumeEntityCreationExample.cc` (or a similar name) implementing the flow described above.
- [ ] Add the new file to [src/sdk/examples/CMakeLists.txt](../../src/sdk/examples/CMakeLists.txt) so it is built with `-DBUILD_EXAMPLES=ON`.
- [ ] Build with `cmake --preset linux-x64-debug -DBUILD_EXAMPLES=ON && cmake --build --preset linux-x64-debug -j 6` and confirm the example compiles cleanly.
- [ ] Run the example against testnet using the standard operator credentials; confirm it succeeds and the printed output is readable.
- [ ] Add a one-line entry referencing the example in any examples index/README that lists the existing examples (if such a list exists).
### ✅ Acceptance Criteria
- [ ] A new example file exists in `src/sdk/examples/` demonstrating HIP-1313 high-volume entity creation.
- [ ] The example builds with `-DBUILD_EXAMPLES=ON` and runs to completion against testnet.
- [ ] The example follows the structure and style of existing single-file examples (operator setup via shared helper, clear output, no leaked resources).
- [ ] No SDK behavior or API changes are introduced — the example only consumes existing public APIs added in PR #1521.
---
### 📋 Step-by-Step Contribution Guide
To help keep contributions consistent and easy to review, we recommend following these steps:
- [ ] Comment `/assign` to request the issue
- [ ] Wait for assignment
- [ ] Fork the repository and create a branch
- [ ] Set up the project using the instructions in `README.md`
- [ ] Make the requested changes
- [ ] Sign each commit using `-s -S`
- [ ] Push your branch and open a pull request
Read [Workflow Guide](https://github.com/hiero-ledger/hiero-sdk-cpp/blob/main/docs/training/workflow.md) for step-by-step workflow guidance.
Read [README.md](https://github.com/hiero-ledger/hiero-sdk-cpp/blob/main/README.md) for setup instructions.
❗ Pull requests **cannot be merged** without `S` and `s` signed commits.
See the [Signing Guide](https://github.com/hiero-ledger/hiero-sdk-cpp/blob/main/docs/training/signing.md).
### 🤔 Additional Information
- HIP-1313 spec: https://hips.hedera.com/hip/hip-1313
- The PR that added the SDK feature: [#1521](https://github.com/hiero-ledger/hiero-sdk-cpp/pull/1521)
- The original feature issue: [#1129](https://github.com/hiero-ledger/hiero-sdk-cpp/issues/1129) (closed; contained the "Example code compiles and runs successfully" acceptance-criteria checkbox that this issue closes the loop on)
If you have questions while working on this issue, feel free to ask! [Hiero-SDK-C++ Discord](https://discord.com/channels/905194001349627914/1337424839761465364)
Contributor guide
Assessment
This issue has not been assessed yet.