Documentation ¶
Index ¶
- Variables
- func Bytes2Hex(d []byte) string
- func CopyBytes(b []byte) (copiedBytes []byte)
- func CreateAddress(addr sdk.AccAddress, nonce uint64) sdk.AccAddress
- func CreateAddress2(addr sdk.AccAddress, salt [32]byte, inithash []byte) sdk.AccAddress
- func FromHex(s string) []byte
- func Hex2Bytes(str string) []byte
- func Hex2BytesFixed(str string, flen int) []byte
- func LeftPadBytes(slice []byte, l int) []byte
- func RightPadBytes(slice []byte, l int) []byte
- func TrimLeftZeroes(s []byte) []byte
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Big0 = big.NewInt(0) Big1 = big.NewInt(1) Big2 = big.NewInt(2) Big3 = big.NewInt(3) Big4 = big.NewInt(4) Big8 = big.NewInt(8) Big16 = big.NewInt(16) Big32 = big.NewInt(32) Big64 = big.NewInt(64) Big96 = big.NewInt(96) Big256 = big.NewInt(256) Big257 = big.NewInt(257) Big480 = big.NewInt(480) Big1024 = big.NewInt(1024) Big3072 = big.NewInt(3072) Big199680 = big.NewInt(199680) )
Common big integers often used
Functions ¶
func CreateAddress ¶
func CreateAddress(addr sdk.AccAddress, nonce uint64) sdk.AccAddress
func CreateAddress2 ¶
func CreateAddress2(addr sdk.AccAddress, salt [32]byte, inithash []byte) sdk.AccAddress
func FromHex ¶
FromHex returns the bytes represented by the hexadecimal string s. s may be prefixed with "0x".
func Hex2BytesFixed ¶
Hex2BytesFixed returns bytes of a specified fixed length flen.
func LeftPadBytes ¶
LeftPadBytes zero-pads slice to the left up to length l.
func RightPadBytes ¶
RightPadBytes zero-pads slice to the right up to length l.
func TrimLeftZeroes ¶
TrimLeftZeroes returns a subslice of s without leading zeroes
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.