Package org.aion.avm.userlib
Class AionUtilities
- java.lang.Object
-
- org.aion.avm.userlib.AionUtilities
-
public class AionUtilities extends java.lang.Object
A collection of methods to facilitate contract development.
-
-
Constructor Summary
Constructors Constructor Description AionUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
padLeft(byte[] topic)
Returns a new byte array of length 32 that right-aligns the input bytes by padding them on the left with 0.
-
-
-
Method Detail
-
padLeft
public static byte[] padLeft(byte[] topic)
Returns a new byte array of length 32 that right-aligns the input bytes by padding them on the left with 0. Note that the input is not truncated if it is larger than 32 bytes. This method can be used to pad log topics.- Parameters:
topic
- bytes to pad- Returns:
- Zero padded topic
- Throws:
java.lang.NullPointerException
- if topic is null
-
-