Skip to content

Commit

Permalink
Merge pull request #16 from zksync-sdk/make-some-utils-methods-public
Browse files Browse the repository at this point in the history
Make some signing utils public
  • Loading branch information
StanislavBreadless authored Oct 8, 2021
2 parents e8085ab + c1bfe41 commit fd13701
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 fd13701

Please sign in to comment.