Documentation
¶
Index ¶
- func AbiSignatureToName(signature string) string
- func AbiToSignature(abiFunc abi.Method) string
- func CollapseIfTuple(input abi.Argument) string
- func DecodeEvmAbiFromTypes(types []string, data []byte) (interface{}, error)
- func FilterEvents(contractABI abi.ABI) []abi.Event
- func FilterFunctions(contractABI abi.ABI) []abi.Method
- func GetParsedAbi(abi_to_decode json.RawMessage)
- func TypeToReadableName(typ string) string
- type ABI
- type AbiEventDecoder
- type AbiFunctionDecoder
- type CairoEventDecoder
- type CairoFunctionDecoder
- type DecodedEventDataclass
- type DecodedFuncDataclass
- type Event
- type EventType
- type Function
- type Function1
- type InterfaceType
- type Member
- type Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbiSignatureToName ¶
func AbiToSignature ¶
func CollapseIfTuple ¶
func DecodeEvmAbiFromTypes ¶
func GetParsedAbi ¶
func GetParsedAbi(abi_to_decode json.RawMessage)
func TypeToReadableName ¶
Types ¶
type ABI ¶
type AbiEventDecoder ¶
type AbiFunctionDecoder ¶
type CairoEventDecoder ¶
type CairoEventDecoder struct { types.AbiEvent Priority int AbiName string IndexedParams int Name string }
func NewCairoEventDecoder ¶
func NewCairoEventDecoder( name string, parameters []string, data map[string]types.StarknetType, keys map[string]types.StarknetType, abiName string, priority int, ) *CairoEventDecoder
func (*CairoEventDecoder) Decode ¶
func (e *CairoEventDecoder) Decode(data [][]byte, keys [][]byte) (types.DecodedEvent, error)
for paramName, starknetType := range d.AbiEvent.Keys { decodedValue, err := starknetType.Decode(keys[0]) if err != nil { return nil, err } decodedData[paramName] = decodedValue keys = keys[1:] }
type CairoFunctionDecoder ¶
type CairoFunctionDecoder struct { *types.AbiFunction Priority int AbiName string }
func NewCairoFunctionDecoder ¶
func NewCairoFunctionDecoder(name string, inputs []types.AbiParameter, outputs []types.StarknetType, abiName string, priority int) *CairoFunctionDecoder
func (*CairoFunctionDecoder) Decode ¶
func (cfd *CairoFunctionDecoder) Decode(calldata [][]byte, result [][]byte) (*types.DecodedFunction, error)
func (*CairoFunctionDecoder) IDStr ¶
func (cfd *CairoFunctionDecoder) IDStr(fullSignature bool) string
type DecodedEventDataclass ¶
type DecodedFuncDataclass ¶
type Event ¶
type Event struct { Name string `json:"name"` Parameters []string `json:"parameters"` Data map[string]types.StarknetType `json:"data"` Keys map[string]types.StarknetType `json:"keys"` }
type Function1 ¶
type Function1 struct { Name string `json:"name"` Inputs []types.AbiParameter `json:"inputs"` Outputs []types.StarknetType `json:"outputs"` }
type InterfaceType ¶
Click to show internal directories.
Click to hide internal directories.