diff --git a/evm/src/main/java/org/hyperledger/besu/evm/internal/Words.java b/evm/src/main/java/org/hyperledger/besu/evm/internal/Words.java index 44b9221b600..bedd139b4e6 100644 --- a/evm/src/main/java/org/hyperledger/besu/evm/internal/Words.java +++ b/evm/src/main/java/org/hyperledger/besu/evm/internal/Words.java @@ -194,11 +194,21 @@ static int readBigEndianI16(final int index, final byte[] array) { return (array[index] << 8) | (array[index + 1] & 0xff); } + /** + * Get the big-endian Bytes representation of an unsigned int, including leading zeros + * @param value the int value + * @return a Bytes object of the value, Big Endian order + */ static Bytes intBytes(final int value) { return Bytes.of( (byte) (value >>> 24), (byte) (value >>> 16), (byte) (value >>> 8), (byte) value); } + /** + * Get the big-endian Bytes representation of an unsigned int, including leading zeros + * @param value the long value + * @return a Bytes object of the value, Big Endian order + */ static Bytes longBytes(final long value) { return Bytes.of( (byte) (value >>> 56),