Skip to content

Commit

Permalink
Make some signing utils public
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavBreadless authored Oct 7, 2021
1 parent e8085ab commit c1bfe41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/io/zksync/signer/SigningUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,21 +254,21 @@ private static byte[] packAmountChecked(BigInteger amount) {
return packAmount(amount);
}

private static BigInteger closestPackableTransactionFee(BigInteger fee) {
public static BigInteger closestPackableTransactionFee(BigInteger fee) {
final byte[] packedFee = packFee(fee);
return decimalByteArrayToInteger(packedFee, FEE_EXPONENT_BIT_WIDTH, FEE_MANTISSA_BIT_WIDTH, 10);
}

private static BigInteger closestPackableTransactionAmount(BigInteger amount) {
public static BigInteger closestPackableTransactionAmount(BigInteger amount) {
final byte[] packedAmount = packAmount(amount);
return decimalByteArrayToInteger(packedAmount, AMOUNT_EXPONENT_BIT_WIDTH, AMOUNT_MANTISSA_BIT_WIDTH, 10);
}

private static byte[] packFee(BigInteger fee) {
public static byte[] packFee(BigInteger fee) {
return reverseBits(integerToDecimalByteArray(fee, FEE_EXPONENT_BIT_WIDTH, FEE_MANTISSA_BIT_WIDTH, 10));
}

private static byte[] packAmount(BigInteger amount) {
public static byte[] packAmount(BigInteger amount) {
return reverseBits(integerToDecimalByteArray(amount, AMOUNT_EXPONENT_BIT_WIDTH, AMOUNT_MANTISSA_BIT_WIDTH, 10));
}

Expand Down

0 comments on commit c1bfe41

Please sign in to comment.