abi

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Abi

type Abi struct {
	Functions   []*Function `protobuf:"bytes,1,rep,name=functions,proto3" json:"functions,omitempty"`
	Events      []*AbiEvent `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"`
	Structs     []*Struct   `protobuf:"bytes,3,rep,name=structs,proto3" json:"structs,omitempty"`
	L1Handlers  []*Function `protobuf:"bytes,4,rep,name=l1Handlers,proto3" json:"l1Handlers,omitempty"`
	Constructor *Function   `protobuf:"bytes,5,opt,name=constructor,proto3" json:"constructor,omitempty"`
	// contains filtered or unexported fields
}

func (*Abi) Descriptor deprecated

func (*Abi) Descriptor() ([]byte, []int)

Deprecated: Use Abi.ProtoReflect.Descriptor instead.

func (*Abi) Equal

func (x *Abi) Equal(y *Abi) bool

func (*Abi) GetConstructor

func (x *Abi) GetConstructor() *Function

func (*Abi) GetEvents

func (x *Abi) GetEvents() []*AbiEvent

func (*Abi) GetFunctions

func (x *Abi) GetFunctions() []*Function

func (*Abi) GetL1Handlers

func (x *Abi) GetL1Handlers() []*Function

func (*Abi) GetStructs

func (x *Abi) GetStructs() []*Struct

func (*Abi) ProtoMessage

func (*Abi) ProtoMessage()

func (*Abi) ProtoReflect

func (x *Abi) ProtoReflect() protoreflect.Message

func (*Abi) Reset

func (x *Abi) Reset()

func (*Abi) String

func (x *Abi) String() string

type AbiEvent

type AbiEvent struct {
	Name string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Data []*AbiEvent_Data `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"`
	Keys []string         `protobuf:"bytes,3,rep,name=keys,proto3" json:"keys,omitempty"`
	// contains filtered or unexported fields
}

func (*AbiEvent) Descriptor deprecated

func (*AbiEvent) Descriptor() ([]byte, []int)

Deprecated: Use AbiEvent.ProtoReflect.Descriptor instead.

func (*AbiEvent) Equal

func (x *AbiEvent) Equal(y *AbiEvent) bool

func (*AbiEvent) GetData

func (x *AbiEvent) GetData() []*AbiEvent_Data

func (*AbiEvent) GetKeys

func (x *AbiEvent) GetKeys() []string

func (*AbiEvent) GetName

func (x *AbiEvent) GetName() string

func (*AbiEvent) ProtoMessage

func (*AbiEvent) ProtoMessage()

func (*AbiEvent) ProtoReflect

func (x *AbiEvent) ProtoReflect() protoreflect.Message

func (*AbiEvent) Reset

func (x *AbiEvent) Reset()

func (*AbiEvent) String

func (x *AbiEvent) String() string

type AbiEvent_Data

type AbiEvent_Data struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*AbiEvent_Data) Descriptor deprecated

func (*AbiEvent_Data) Descriptor() ([]byte, []int)

Deprecated: Use AbiEvent_Data.ProtoReflect.Descriptor instead.

func (*AbiEvent_Data) GetName

func (x *AbiEvent_Data) GetName() string

func (*AbiEvent_Data) GetType

func (x *AbiEvent_Data) GetType() string

func (*AbiEvent_Data) ProtoMessage

func (*AbiEvent_Data) ProtoMessage()

func (*AbiEvent_Data) ProtoReflect

func (x *AbiEvent_Data) ProtoReflect() protoreflect.Message

func (*AbiEvent_Data) Reset

func (x *AbiEvent_Data) Reset()

func (*AbiEvent_Data) String

func (x *AbiEvent_Data) String() string

type Function

type Function struct {
	Name    string             `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Inputs  []*Function_Input  `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"`
	Outputs []*Function_Output `protobuf:"bytes,3,rep,name=outputs,proto3" json:"outputs,omitempty"`
	// contains filtered or unexported fields
}

func (*Function) Descriptor deprecated

func (*Function) Descriptor() ([]byte, []int)

Deprecated: Use Function.ProtoReflect.Descriptor instead.

func (*Function) Equal

func (x *Function) Equal(y *Function) bool

func (*Function) GetInputs

func (x *Function) GetInputs() []*Function_Input

func (*Function) GetName

func (x *Function) GetName() string

func (*Function) GetOutputs

func (x *Function) GetOutputs() []*Function_Output

func (*Function) ProtoMessage

func (*Function) ProtoMessage()

func (*Function) ProtoReflect

func (x *Function) ProtoReflect() protoreflect.Message

func (*Function) Reset

func (x *Function) Reset()

func (*Function) String

func (x *Function) String() string

type Function_Input

type Function_Input struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Function_Input) Descriptor deprecated

func (*Function_Input) Descriptor() ([]byte, []int)

Deprecated: Use Function_Input.ProtoReflect.Descriptor instead.

func (*Function_Input) GetName

func (x *Function_Input) GetName() string

func (*Function_Input) GetType

func (x *Function_Input) GetType() string

func (*Function_Input) ProtoMessage

func (*Function_Input) ProtoMessage()

func (*Function_Input) ProtoReflect

func (x *Function_Input) ProtoReflect() protoreflect.Message

func (*Function_Input) Reset

func (x *Function_Input) Reset()

func (*Function_Input) String

func (x *Function_Input) String() string

type Function_Output

type Function_Output struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Function_Output) Descriptor deprecated

func (*Function_Output) Descriptor() ([]byte, []int)

Deprecated: Use Function_Output.ProtoReflect.Descriptor instead.

func (*Function_Output) GetName

func (x *Function_Output) GetName() string

func (*Function_Output) GetType

func (x *Function_Output) GetType() string

func (*Function_Output) ProtoMessage

func (*Function_Output) ProtoMessage()

func (*Function_Output) ProtoReflect

func (x *Function_Output) ProtoReflect() protoreflect.Message

func (*Function_Output) Reset

func (x *Function_Output) Reset()

func (*Function_Output) String

func (x *Function_Output) String() string

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is a database to store and get the contracts ABI.

func NewManager

func NewManager(database db.Database) *Manager

NewManager creates a new Manager instance.

func (*Manager) Close

func (m *Manager) Close()

Close closes the associated database

func (*Manager) GetABI

func (m *Manager) GetABI(contractAddress string) (*Abi, error)

GetABI gets the ABI associated with the contract address. If the ABI does not exist, then returns nil without error.

func (*Manager) PutABI

func (m *Manager) PutABI(contractAddress string, abi *Abi) error

PutABI puts the ABI to the contract address.

type Struct

type Struct struct {
	Fields []*Struct_Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
	Name   string          `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Size   uint64          `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

func (*Struct) Descriptor deprecated

func (*Struct) Descriptor() ([]byte, []int)

Deprecated: Use Struct.ProtoReflect.Descriptor instead.

func (*Struct) Equal

func (x *Struct) Equal(y *Struct) bool

func (*Struct) GetFields

func (x *Struct) GetFields() []*Struct_Field

func (*Struct) GetName

func (x *Struct) GetName() string

func (*Struct) GetSize

func (x *Struct) GetSize() uint64

func (*Struct) ProtoMessage

func (*Struct) ProtoMessage()

func (*Struct) ProtoReflect

func (x *Struct) ProtoReflect() protoreflect.Message

func (*Struct) Reset

func (x *Struct) Reset()

func (*Struct) String

func (x *Struct) String() string

type Struct_Field

type Struct_Field struct {
	Name   string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type   string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Offset uint32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*Struct_Field) Descriptor deprecated

func (*Struct_Field) Descriptor() ([]byte, []int)

Deprecated: Use Struct_Field.ProtoReflect.Descriptor instead.

func (*Struct_Field) GetName

func (x *Struct_Field) GetName() string

func (*Struct_Field) GetOffset

func (x *Struct_Field) GetOffset() uint32

func (*Struct_Field) GetType

func (x *Struct_Field) GetType() string

func (*Struct_Field) ProtoMessage

func (*Struct_Field) ProtoMessage()

func (*Struct_Field) ProtoReflect

func (x *Struct_Field) ProtoReflect() protoreflect.Message

func (*Struct_Field) Reset

func (x *Struct_Field) Reset()

func (*Struct_Field) String

func (x *Struct_Field) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL