Documentation
¶
Index ¶
- Variables
- func Addr2Hex(a Addr) string
- func Bytes2AddrHex(b []byte) string
- func Bytes2Hex(b []byte) string
- func FormatAddrHex(s string) string
- func Hex2Bytes(s string) (b []byte)
- func Pad20Bytes(in []byte) []byte
- func Pad32Bytes(in []byte) []byte
- type Addr
- type ContractCodec
- func (c *ContractCodec) ABI() *abi.ABI
- func (c *ContractCodec) DecodeCalldata(methodName string, data []byte, ptrs ...interface{}) error
- func (c *ContractCodec) DecodeReturnData(methodName string, data []byte, ptrs ...interface{}) error
- func (c *ContractCodec) EncodeCalldata(methodName string, args ...interface{}) ([]byte, error)
- func (c *ContractCodec) EncodeReturnData(methodName string, ifaces ...interface{}) ([]byte, error)
- func (c *ContractCodec) Selector(methodName string) []byte
- type Hash
- type IMulticaller
- type MulticallResponse
- type MulticallResults
- type Multicaller
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func FormatAddrHex ¶
FormatAddrHex formats a string into standard Addr string
func Hex2Bytes ¶
Hex2Bytes supports hex string with or without 0x prefix Calls hex.DecodeString directly and ignore err similar to ec.FromHex but better
func Pad20Bytes ¶
if in is 20 bytes, return directly. otherwise return a new []byte w/ len 20, left pad 0x00..[in] if len(in)>20, panic
func Pad32Bytes ¶
Types ¶
type Addr ¶
Addr is alias to geth common.Address
func Bytes2Addr ¶
Bytes2Addr returns Address from b Addr.Bytes() does the reverse
type ContractCodec ¶
type ContractCodec struct {
// contains filtered or unexported fields
}
func NewContractCodec ¶
func NewContractCodec(abistr string) *ContractCodec
func (*ContractCodec) ABI ¶
func (c *ContractCodec) ABI() *abi.ABI
func (*ContractCodec) DecodeCalldata ¶
func (c *ContractCodec) DecodeCalldata(methodName string, data []byte, ptrs ...interface{}) error
func (*ContractCodec) DecodeReturnData ¶
func (c *ContractCodec) DecodeReturnData(methodName string, data []byte, ptrs ...interface{}) error
func (*ContractCodec) EncodeCalldata ¶
func (c *ContractCodec) EncodeCalldata(methodName string, args ...interface{}) ([]byte, error)
func (*ContractCodec) EncodeReturnData ¶
func (c *ContractCodec) EncodeReturnData(methodName string, ifaces ...interface{}) ([]byte, error)
func (*ContractCodec) Selector ¶
func (c *ContractCodec) Selector(methodName string) []byte
type IMulticaller ¶
type IMulticaller interface {
TryBlockAndAggregate(requireSuccess bool, calls []multicall.IMulticall2Call) (*MulticallResponse, error)
}
type MulticallResponse ¶
type MulticallResponse struct { BlockNumber *big.Int BlockHash Hash ReturnData MulticallResults }
type MulticallResults ¶
type Multicaller ¶
type Multicaller struct {
// contains filtered or unexported fields
}
The quote functions in IQuoterV2 are a non-view functions. Manual low-level operations are needed to call it statically
func NewMulticaller ¶
func (*Multicaller) TryBlockAndAggregate ¶
func (m *Multicaller) TryBlockAndAggregate(requireSuccess bool, calls []multicall.IMulticall2Call) (*MulticallResponse, error)
Click to show internal directories.
Click to hide internal directories.