hiero-ledger / hiero-ledger/hiero-sdk-java

`ContractCreateFlow` creates a file for smaller initcode

Open
#1,746 0 comments 0 reactions 1 assignee Claimed by @thenswan View on GitHub
enhancement
Dominant language
Java
Stars
264
Forks
192
Avg merge
2d
Merged PRs (30d)
39

Description

### Problem

The `ContractCreateFlow` does not take advantage of newer features of HAPI to reduce the number and cost of transactions. Same issue in all SDKs.

### Solution

* The initcode file is created unconditionally instead of directly using `ContractCreateTransaction.bytecode` if it fits within a single transaction. File append and delete would likewise not be needed if bytecode is populated.
* `FileCreateTransaction` partial bytecode is limited to 2048 instead of a larger size closer to max HAPI size 6 KiB
* `FileAppendTransaction` sets chunk size to 2048 instead of a size closer to max HAPI size 6 KiB

### Alternatives

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.