Documentation ¶
Index ¶
- Constants
- Variables
- func EVMIntToHashBytes(i *Int) [hashLength]byte
- func FromHex(s string) ([]byte, error)
- func GetDataFrom(src []byte, offset uint64, size uint64) []byte
- func Has0xPrefix(str string) bool
- func Keccak256(data []byte) []byte
- func LeftPadBytes(slice []byte, l int) []byte
- func LeftPaddingSlice(src []byte, toSize int) []byte
- func MinI(i, j int64) int64
- func RightPaddingSlice(src []byte, toSize int) []byte
- type Address
- type Int
- func BytesDataToEVMIntHash(data []byte) *Int
- func EthHashBytesToEVMInt(hash [hashLength]byte) (*Int, error)
- func FromBigInt(i *big.Int) *Int
- func FromDecimalString(s string) *Int
- func FromHexString(s string) *Int
- func FromString(ss string) *Int
- func HashBytesToEVMInt(hash []byte) (*Int, error)
- func MakeAddress(data []byte) *Int
- func MakeAddressFromHex(str string) (*Int, error)
- func MakeAddressFromString(str string) (*Int, error)
- func MinInt(i, j *Int) *Int
- func New(i int64) *Int
- func (i *Int) Add(y *Int) *Int
- func (i *Int) AddMod(y *Int, m *Int) *Int
- func (i *Int) And(y *Int) *Int
- func (i *Int) AsStringKey() string
- func (i *Int) ByteAt(n int) byte
- func (i Int) Clone() *Int
- func (i *Int) Div(y *Int) *Int
- func (i *Int) EQ(y *Int) bool
- func (i *Int) Exp(e *Int) *Int
- func (i *Int) GT(y *Int) bool
- func (i *Int) GetSigned() *Int
- func (i *Int) IsZero() bool
- func (i *Int) LT(y *Int) bool
- func (i *Int) Mod(m *Int) *Int
- func (i *Int) Mul(y *Int) *Int
- func (i *Int) MulMod(y *Int, m *Int) *Int
- func (i *Int) Not(y *Int) *Int
- func (i *Int) Or(y *Int) *Int
- func (i *Int) SAR(n uint64) *Int
- func (i *Int) SDiv(y *Int) *Int
- func (i *Int) SGT(y *Int) bool
- func (i *Int) SHL(n uint64) *Int
- func (i *Int) SHR(n uint64) *Int
- func (i *Int) SLT(y *Int) bool
- func (i *Int) SMod(m *Int) *Int
- func (i *Int) SignExtend(baseBytes *Int) *Int
- func (i *Int) Sub(y *Int) *Int
- func (i *Int) XOr(y *Int) *Int
Constants ¶
View Source
const (
AddressLength = 20
)
Variables ¶
Functions ¶
func EVMIntToHashBytes ¶
EVMIntToHashBytes returns the absolute value of x as a big-endian fixed length byte slice.
func LeftPadBytes ¶
LeftPadBytes zero-pads slice to the left up to length l.
Types ¶
type Address ¶
type Address [AddressLength]byte
func BytesToAddress ¶
BytesToAddress any byte set to a evm address
func HexToAddress ¶
HexToAddress any hex make a evm address
func StringToAddress ¶
StringToAddress any string make a evm address
type Int ¶
func BytesDataToEVMIntHash ¶
BytesDataToEVMIntHash fixed length bytes
func EthHashBytesToEVMInt ¶
EthHashBytesToEVMInt EVMIntToHashBytes reverse
func FromDecimalString ¶
FromString from fmt data Int.String()
func FromHexString ¶
FromString from fmt data hex.encodeToString([]byte(Int.AsStringKey))
func HashBytesToEVMInt ¶
HashBytesToEVMInt byte to bigInt
func MakeAddressFromHex ¶
MakeAddressFromHex any hex str make a evm.Int
func MakeAddressFromString ¶
MakeAddressFromString any str make a evm.Int
Click to show internal directories.
Click to hide internal directories.