Documentation ¶
Index ¶
- func AbiCoder(argTypes []string, argValues []interface{}) ([]byte, error)
- func AbiCoderHex(argTypes []string, argValues []interface{}) (string, error)
- func AbiDecodeExpr(expr string, input []byte, argValues []interface{}) error
- func AbiDecodeExprAndStringify(expr string, input []byte) ([]string, error)
- func AbiDecoder(argTypes []string, input []byte, argValues []interface{}) error
- func AbiDecoderWithReturnedValues(argTypes []string, input []byte) ([]interface{}, error)
- func AbiEncodeMethodCalldata(methodExpr string, argValues []interface{}) ([]byte, error)
- func AbiEncodeMethodCalldataFromStringValues(methodExpr string, argStringValues []string) ([]byte, error)
- func AbiMarshalStringValues(argTypes []string, input []byte) ([]string, error)
- func AbiUnmarshalStringValues(argTypes []string, stringValues []string) ([]interface{}, error)
- func AddressPadding(input string) string
- func BytesToBytes32(slice []byte) [32]byte
- func FunctionSignature(functionExpr string) string
- func HexDecode(h string) ([]byte, error)
- func HexDecodeBigIntArray(bigNumsHex []string) ([]*big.Int, error)
- func HexDecodeBytes32(h string) ([32]byte, error)
- func HexEncode(h []byte) string
- func HexEncodeBigIntArray(bigNums []*big.Int) ([]string, error)
- func HexTrimLeadingZeros(hex string) (string, error)
- func Keccak256(input []byte) []byte
- func MustHexDecode(h string) []byte
- func MustNewArrayTypeTuple(components []abi.ArgumentMarshaling) abi.Type
- func MustNewType(str string) abi.Type
- func PadZeros(array []byte, totalLength int) ([]byte, error)
- func ParseMethodABI(methodExpr, returnsExpr string) (*abi.ABI, string, error)
- func SolidityPack(argTypes []string, argValues []interface{}) ([]byte, error)
- func SolidityPackHex(argTypes []string, argValues []interface{}) (string, error)
- func StringifyValues(values []interface{}) ([]string, error)
- type TypedData
- type TypedDataArgument
- type TypedDataDomain
- type TypedDataTypes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbiCoderHex ¶
func AbiDecodeExpr ¶
func AbiDecoder ¶
func AbiEncodeMethodCalldata ¶
func AbiMarshalStringValues ¶
func AbiUnmarshalStringValues ¶
AbiDecodeStringValues will take an array of ethereum types and string values, and decode the string values to runtime objects.
func AddressPadding ¶
func BytesToBytes32 ¶
func FunctionSignature ¶
func HexDecodeBytes32 ¶
func HexTrimLeadingZeros ¶
func MustHexDecode ¶
func MustNewArrayTypeTuple ¶ added in v1.4.1
func MustNewArrayTypeTuple(components []abi.ArgumentMarshaling) abi.Type
func MustNewType ¶ added in v1.4.1
func ParseMethodABI ¶
ParseMethodABI will return an `abi.ABI` object from the short-hand method string expression, for example, methodExpr: `balanceOf(address)` returnsExpr: `uint256`
func SolidityPack ¶
func SolidityPackHex ¶
func StringifyValues ¶
Types ¶
type TypedData ¶
type TypedData struct { Types TypedDataTypes `json:"types"` PrimaryType string `json:"primaryType"` Domain TypedDataDomain `json:"domain"` Message map[string]interface{} `json:"message"` }
func (*TypedData) EncodeDigest ¶
type TypedDataArgument ¶
type TypedDataDomain ¶
type TypedDataDomain struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` ChainID *big.Int `json:"chainId,omitempty"` VerifyingContract *common.Address `json:"verifyingContract,omitempty"` Salt *[32]byte `json:"salt,omitempty"` }
func (TypedDataDomain) Map ¶
func (t TypedDataDomain) Map() map[string]interface{}
type TypedDataTypes ¶
type TypedDataTypes map[string][]TypedDataArgument
func (TypedDataTypes) EncodeType ¶
func (t TypedDataTypes) EncodeType(primaryType string) (string, error)
Click to show internal directories.
Click to hide internal directories.