hedera-sdk-java icon indicating copy to clipboard operation
hedera-sdk-java copied to clipboard

Add `addBytes4()` method to `ContractFunctionParameters`

Open natanasow opened this issue 1 year ago • 0 comments

Problem

Currently, there are addBytes and addBytes32 but the addBytes4 method is missing. It's needed sometimes when we want to add only a function selector for an internal call because it's always 4 bytes.

Solution

Add addBytes4 method that should add the input as function param to the args and if the input is not exactly 4 bytes, an error should be thrown.

PS: The addBytes32 method could be used as a reference of what has to be done.

Alternatives

No response

natanasow avatar Nov 28 '23 09:11 natanasow