package
0.0.0-20250130105826-8a2b41069928
Repository: https://github.com/0xbridge/polygon-edge.git
Documentation: pkg.go.dev
# Functions
BigIntDivCeil performs integer division and rounds given result to next bigger integer number It is calculated using this formula result = (a + b - 1) / b.
BigMin returns the smallest of x or y.
No description provided by the author
Creates a directory at path and with perms level permissions.
DirectoryExists checks if the directory at the specified path exists.
No description provided by the author
No description provided by the author
EncodeBytesToUint64 big endian byte slice to uint64.
No description provided by the author
EncodeUint64ToBytes encodes provided uint64 to big endian byte slice.
ExtendByteSlice extends given byte slice by needLength parameter and trims it.
Checks if the file at the specified path exists.
GetTerminationSignalCh returns a channel to emit signals by ctrl + c.
IsContextDone returns true if the error is due to the context being cancelled or expired.
Max returns the strictly bigger number.
Min returns the strictly lower number.
PadLeftOrTrim left-pads the passed in byte array to the specified size, or trims the array if it exceeds the passed in size.
No description provided by the author
No description provided by the author
ParseUint64orHex parses the given uint64 hex string into the number.
RetryForever will execute a function until it completes without error or the context is cancelled or expired.
SafeAddUint64 sums two unsigned int64 numbers if there is no overflow.
Creates a file at path and with perms level permissions.
SetupDataDir sets up the data directory and the corresponding sub-directories.
# Variables
No description provided by the author
MaxSafeJSInt represents max value which JS support It is used for smartContract fields Our staking repo is written in JS, as are many other clients If we use higher value JS will not be able to parse it.
# Structs
Duration is a wrapper struct for time.Duration which implements json (un)marshaling.
JSONNumber is the number represented in decimal or hex in json.