File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
hiero-enterprise-base/src/main/java/com/openelements/hiero/base/data Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 88import com .openelements .hiero .base .implementation .data .ParamSupplier ;
99import com .openelements .hiero .base .implementation .data .StringBasedDatatype ;
1010import java .math .BigInteger ;
11+ import java .nio .charset .StandardCharsets ;
1112import java .util .Objects ;
1213import org .jspecify .annotations .NonNull ;
1314
@@ -67,6 +68,16 @@ public static ContractParam<String> bytes32(String value) {
6768 return of (value , StringBasedDatatype .BYTES32 );
6869 }
6970
71+ @ NonNull
72+ public static ContractParam <String > bytes (byte [] value ) {
73+ return of (new String (value , StandardCharsets .UTF_8 ), StringBasedDatatype .BYTES );
74+ }
75+
76+ @ NonNull
77+ public static ContractParam <String > bytes32 (byte [] value ) {
78+ return of (new String (value , StandardCharsets .UTF_8 ), StringBasedDatatype .BYTES32 );
79+ }
80+
7081 /**
7182 * Creates a new contract parameter with the given value and native type {@code address}. The input must be address
7283 * in solidty format.
You can’t perform that action at this time.
0 commit comments