eip_pb

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 4 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfidenceLevel_name = map[int32]string{
		0: "NO_CONFIDENCE",
		3: "HIGH_CONFIDENCE",
		2: "MEDIUM_CONFIDENCE",
		1: "LOW_CONFIDENCE",
	}
	ConfidenceLevel_value = map[string]int32{
		"NO_CONFIDENCE":     0,
		"HIGH_CONFIDENCE":   3,
		"MEDIUM_CONFIDENCE": 2,
		"LOW_CONFIDENCE":    1,
	}
)

Enum value maps for ConfidenceLevel.

View Source
var (
	ConfidenceThreshold_name = map[int32]string{
		0:   "NO_CONFIDENCE_THRESHOLD",
		900: "HIGH_CONFIDENCE_THRESHOLD",
		500: "MEDIUM_CONFIDENCE_THRESHOLD",
		100: "LOW_CONFIDENCE_THRESHOLD",
	}
	ConfidenceThreshold_value = map[string]int32{
		"NO_CONFIDENCE_THRESHOLD":     0,
		"HIGH_CONFIDENCE_THRESHOLD":   900,
		"MEDIUM_CONFIDENCE_THRESHOLD": 500,
		"LOW_CONFIDENCE_THRESHOLD":    100,
	}
)

Enum value maps for ConfidenceThreshold.

View Source
var (
	Standard_name = map[int32]string{
		0:  "UNKNOWN",
		1:  "ERC20",
		2:  "ERC721",
		3:  "ERC223",
		4:  "ERC1820",
		5:  "ERC1822",
		6:  "ERC777",
		7:  "ERC1155",
		8:  "ERC1337",
		9:  "ERC1400",
		10: "ERC1410",
		11: "ERC165",
		12: "ERC820",
		13: "ERC1014",
		14: "ERC1948",
		15: "ERC1967",
		16: "ERC2309",
		17: "ERC2535",
		18: "ERC2771",
		19: "ERC2917",
		20: "ERC3156",
		21: "OZOWNABLE",
	}
	Standard_value = map[string]int32{
		"UNKNOWN":   0,
		"ERC20":     1,
		"ERC721":    2,
		"ERC223":    3,
		"ERC1820":   4,
		"ERC1822":   5,
		"ERC777":    6,
		"ERC1155":   7,
		"ERC1337":   8,
		"ERC1400":   9,
		"ERC1410":   10,
		"ERC165":    11,
		"ERC820":    12,
		"ERC1014":   13,
		"ERC1948":   14,
		"ERC1967":   15,
		"ERC2309":   16,
		"ERC2535":   17,
		"ERC2771":   18,
		"ERC2917":   19,
		"ERC3156":   20,
		"OZOWNABLE": 21,
	}
)

Enum value maps for Standard.

View Source
var File_eip_discovery_proto protoreflect.FileDescriptor
View Source
var File_eip_eip_proto protoreflect.FileDescriptor
View Source
var File_eip_standards_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ConfidenceLevel

type ConfidenceLevel int32

ConfidenceLevel enum

const (
	ConfidenceLevel_NO_CONFIDENCE     ConfidenceLevel = 0
	ConfidenceLevel_HIGH_CONFIDENCE   ConfidenceLevel = 3
	ConfidenceLevel_MEDIUM_CONFIDENCE ConfidenceLevel = 2
	ConfidenceLevel_LOW_CONFIDENCE    ConfidenceLevel = 1
)

func (ConfidenceLevel) Descriptor

func (ConfidenceLevel) Enum

func (x ConfidenceLevel) Enum() *ConfidenceLevel

func (ConfidenceLevel) EnumDescriptor deprecated

func (ConfidenceLevel) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConfidenceLevel.Descriptor instead.

func (ConfidenceLevel) Number

func (ConfidenceLevel) String

func (x ConfidenceLevel) String() string

func (ConfidenceLevel) Type

type ConfidenceThreshold

type ConfidenceThreshold int32

ConfidenceThreshold enum

const (
	ConfidenceThreshold_NO_CONFIDENCE_THRESHOLD     ConfidenceThreshold = 0   // 0.0 scaled to 0
	ConfidenceThreshold_HIGH_CONFIDENCE_THRESHOLD   ConfidenceThreshold = 900 // 0.9 scaled to 900
	ConfidenceThreshold_MEDIUM_CONFIDENCE_THRESHOLD ConfidenceThreshold = 500 // 0.5 scaled to 500
	ConfidenceThreshold_LOW_CONFIDENCE_THRESHOLD    ConfidenceThreshold = 100 // 0.1 scaled to 100
)

func (ConfidenceThreshold) Descriptor

func (ConfidenceThreshold) Enum

func (ConfidenceThreshold) EnumDescriptor deprecated

func (ConfidenceThreshold) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConfidenceThreshold.Descriptor instead.

func (ConfidenceThreshold) Number

func (ConfidenceThreshold) String

func (x ConfidenceThreshold) String() string

func (ConfidenceThreshold) Type

type Contract

type Contract struct {
	Name      string      `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`           // Name of the contract.
	Functions []*Function `protobuf:"bytes,2,rep,name=functions,proto3" json:"functions,omitempty"` // Functions defined in the contract.
	Events    []*Event    `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"`       // Events defined in the contract.
	// contains filtered or unexported fields
}

Represents an compliance discovery contract response

func (*Contract) Descriptor deprecated

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

Deprecated: Use Contract.ProtoReflect.Descriptor instead.

func (*Contract) GetEvents

func (x *Contract) GetEvents() []*Event

func (*Contract) GetFunctions

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

func (*Contract) GetName

func (x *Contract) GetName() string

func (*Contract) ProtoMessage

func (*Contract) ProtoMessage()

func (*Contract) ProtoReflect

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

func (*Contract) Reset

func (x *Contract) Reset()

func (*Contract) String

func (x *Contract) String() string

type ContractStandard

type ContractStandard struct {
	Name      string      `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`                              // Name of the EIP standard.
	Url       string      `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`                                // URL of the EIP standard.
	Type      Standard    `protobuf:"varint,3,opt,name=type,proto3,enum=unpack.v1.eip.Standard" json:"type,omitempty"` // Type of the contract standard.
	Stagnant  bool        `protobuf:"varint,4,opt,name=stagnant,proto3" json:"stagnant,omitempty"`                     // Indicates if the contract standard is stagnant.
	Functions []*Function `protobuf:"bytes,5,rep,name=functions,proto3" json:"functions,omitempty"`                    // Functions defined in the contract standard.
	Events    []*Event    `protobuf:"bytes,6,rep,name=events,proto3" json:"events,omitempty"`                          // Events defined in the contract standard.
	// contains filtered or unexported fields
}

Represents a standard interface for Ethereum smart contracts.

func (*ContractStandard) Descriptor deprecated

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

Deprecated: Use ContractStandard.ProtoReflect.Descriptor instead.

func (*ContractStandard) GetEvents

func (x *ContractStandard) GetEvents() []*Event

func (*ContractStandard) GetFunctions

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

func (*ContractStandard) GetName

func (x *ContractStandard) GetName() string

func (*ContractStandard) GetStagnant

func (x *ContractStandard) GetStagnant() bool

func (*ContractStandard) GetType

func (x *ContractStandard) GetType() Standard

func (*ContractStandard) GetUrl

func (x *ContractStandard) GetUrl() string

func (*ContractStandard) ProtoMessage

func (*ContractStandard) ProtoMessage()

func (*ContractStandard) ProtoReflect

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

func (*ContractStandard) Reset

func (x *ContractStandard) Reset()

func (*ContractStandard) String

func (x *ContractStandard) String() string

type Discovery

type Discovery struct {

	// standard represents the EIP standard that was discovered.
	Standard Standard `protobuf:"varint,1,opt,name=standard,proto3,enum=unpack.v1.eip.Standard" json:"standard,omitempty"`
	// confidence represents the confidence level of the discovery.
	Confidence ConfidenceLevel `protobuf:"varint,2,opt,name=confidence,proto3,enum=unpack.v1.eip.ConfidenceLevel" json:"confidence,omitempty"`
	// confidence_points represents the confidence points of the discovery.
	ConfidencePoints int32 `protobuf:"varint,3,opt,name=confidence_points,json=confidencePoints,proto3" json:"confidence_points,omitempty"`
	// threshold represents the threshold level of the discovery.
	Threshold ConfidenceThreshold `protobuf:"varint,4,opt,name=threshold,proto3,enum=unpack.v1.eip.ConfidenceThreshold" json:"threshold,omitempty"`
	// maximum_tokens represents the maximum number of tokens in the standard.
	// This is basically a standard TokenCount() function response value.
	MaximumTokens int32 `protobuf:"varint,5,opt,name=maximum_tokens,json=maximumTokens,proto3" json:"maximum_tokens,omitempty"`
	// discovered_tokens represents the number of tokens discovered in the standard.
	// The more tokens discovered, the higher the confidence level.
	DiscoveredTokens int32 `protobuf:"varint,6,opt,name=discovered_tokens,json=discoveredTokens,proto3" json:"discovered_tokens,omitempty"`
	// contract represents the contract being scanned, including matched functions and events.
	Contract *Contract `protobuf:"bytes,7,opt,name=contract,proto3" json:"contract,omitempty"`
	// contains filtered or unexported fields
}

Contract Discovery result message

func (*Discovery) Descriptor deprecated

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

Deprecated: Use Discovery.ProtoReflect.Descriptor instead.

func (*Discovery) GetConfidence

func (x *Discovery) GetConfidence() ConfidenceLevel

func (*Discovery) GetConfidencePoints

func (x *Discovery) GetConfidencePoints() int32

func (*Discovery) GetContract

func (x *Discovery) GetContract() *Contract

func (*Discovery) GetDiscoveredTokens

func (x *Discovery) GetDiscoveredTokens() int32

func (*Discovery) GetMaximumTokens

func (x *Discovery) GetMaximumTokens() int32

func (*Discovery) GetStandard

func (x *Discovery) GetStandard() Standard

func (*Discovery) GetThreshold

func (x *Discovery) GetThreshold() ConfidenceThreshold

func (*Discovery) ProtoMessage

func (*Discovery) ProtoMessage()

func (*Discovery) ProtoReflect

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

func (*Discovery) Reset

func (x *Discovery) Reset()

func (*Discovery) String

func (x *Discovery) String() string

type Event

type Event struct {
	Name    string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`        // Name of the event.
	Inputs  []*Input  `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"`    // Input parameters of the event.
	Outputs []*Output `protobuf:"bytes,3,rep,name=outputs,proto3" json:"outputs,omitempty"`  // Data types of the event's return values.
	Matched bool      `protobuf:"varint,4,opt,name=matched,proto3" json:"matched,omitempty"` // Indicates if the event is matched.
	// contains filtered or unexported fields
}

Represents an Ethereum smart contract event.

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetInputs

func (x *Event) GetInputs() []*Input

func (*Event) GetMatched

func (x *Event) GetMatched() bool

func (*Event) GetName

func (x *Event) GetName() string

func (*Event) GetOutputs

func (x *Event) GetOutputs() []*Output

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type Function

type Function struct {
	Name    string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`        // Name of the function.
	Inputs  []*Input  `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"`    // Input parameters of the function.
	Outputs []*Output `protobuf:"bytes,3,rep,name=outputs,proto3" json:"outputs,omitempty"`  // Data types of the function's return values.
	Matched bool      `protobuf:"varint,4,opt,name=matched,proto3" json:"matched,omitempty"` // Indicates if the function is matched.
	// contains filtered or unexported fields
}

Represents an Ethereum smart contract function.

func (*Function) Descriptor deprecated

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

Deprecated: Use Function.ProtoReflect.Descriptor instead.

func (*Function) GetInputs

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

func (*Function) GetMatched

func (x *Function) GetMatched() bool

func (*Function) GetName

func (x *Function) GetName() string

func (*Function) GetOutputs

func (x *Function) GetOutputs() []*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 Input

type Input struct {
	Type    string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`        // Ethereum data type of the input.
	Indexed bool   `protobuf:"varint,2,opt,name=indexed,proto3" json:"indexed,omitempty"` // Indicates if the input is indexed.
	Matched bool   `protobuf:"varint,3,opt,name=matched,proto3" json:"matched,omitempty"` // Indicates if the input is matched.
	// contains filtered or unexported fields
}

Represents an input parameter for Ethereum functions and events.

func (*Input) Descriptor deprecated

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

Deprecated: Use Input.ProtoReflect.Descriptor instead.

func (*Input) GetIndexed

func (x *Input) GetIndexed() bool

func (*Input) GetMatched

func (x *Input) GetMatched() bool

func (*Input) GetType

func (x *Input) GetType() string

func (*Input) ProtoMessage

func (*Input) ProtoMessage()

func (*Input) ProtoReflect

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

func (*Input) Reset

func (x *Input) Reset()

func (*Input) String

func (x *Input) String() string

type Output

type Output struct {
	Type    string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`        // Ethereum data type of the input.
	Matched bool   `protobuf:"varint,2,opt,name=matched,proto3" json:"matched,omitempty"` // Indicates if the output is matched.
	// contains filtered or unexported fields
}

Represents an output parameter for Ethereum functions and events.

func (*Output) Descriptor deprecated

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

Deprecated: Use Output.ProtoReflect.Descriptor instead.

func (*Output) GetMatched

func (x *Output) GetMatched() bool

func (*Output) GetType

func (x *Output) GetType() string

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) ProtoReflect

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

func (*Output) Reset

func (x *Output) Reset()

func (*Output) String

func (x *Output) String() string

type Standard

type Standard int32

Represents the standard interface for Ethereum smart contracts.

const (
	Standard_UNKNOWN   Standard = 0  // Default value for the enum.
	Standard_ERC20     Standard = 1  // ERC-20 Token Standard.
	Standard_ERC721    Standard = 2  // ERC-721 Non-Fungible Token Standard.
	Standard_ERC223    Standard = 3  // ERC-223 Token Standard.
	Standard_ERC1820   Standard = 4  // EIP-1820 Pseudo-introspection Registry.
	Standard_ERC1822   Standard = 5  // EIP-1822 Proxies.
	Standard_ERC777    Standard = 6  // ERC-777 Token Standard.
	Standard_ERC1155   Standard = 7  // ERC-1155 Multi Token Standard.
	Standard_ERC1337   Standard = 8  // ERC-1337 Subscription Standard.
	Standard_ERC1400   Standard = 9  // ERC-1400 Security Token Standard.
	Standard_ERC1410   Standard = 10 // ERC-1410 Partially Fungible Token Standard.
	Standard_ERC165    Standard = 11 // ERC-165 Standard Interface Detection.
	Standard_ERC820    Standard = 12 // ERC-820 Registry Standard.
	Standard_ERC1014   Standard = 13 // ERC-1014 Create2 (related to proxy creation).
	Standard_ERC1948   Standard = 14 // ERC-1948 Non-Fungible Data Token.
	Standard_ERC1967   Standard = 15 // ERC-1967 Proxy Storage Slots.
	Standard_ERC2309   Standard = 16 // ERC-2309 Consecutive Transfer Extension for NFTs.
	Standard_ERC2535   Standard = 17 // ERC-2535 Diamond Standard (a form of upgradeable contract).
	Standard_ERC2771   Standard = 18 // ERC-2771 Meta Transactions (can be related to token interactions).
	Standard_ERC2917   Standard = 19 // ERC-2917 Delegatable Yield Standard (related to tokens).
	Standard_ERC3156   Standard = 20 // ERC-3156 Flash Loans (related to tokens).
	Standard_OZOWNABLE Standard = 21 // OpenZeppelin Ownable
)

func (Standard) Descriptor

func (Standard) Descriptor() protoreflect.EnumDescriptor

func (Standard) Enum

func (x Standard) Enum() *Standard

func (Standard) EnumDescriptor deprecated

func (Standard) EnumDescriptor() ([]byte, []int)

Deprecated: Use Standard.Descriptor instead.

func (Standard) Number

func (x Standard) Number() protoreflect.EnumNumber

func (Standard) String

func (x Standard) String() string

func (Standard) Type

type Standards

type Standards struct {
	Standards []*ContractStandard `protobuf:"bytes,1,rep,name=standards,proto3" json:"standards,omitempty"` // Contract standards.
	// contains filtered or unexported fields
}

Represents a list of contract standards supported by network.

func (*Standards) Descriptor deprecated

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

Deprecated: Use Standards.ProtoReflect.Descriptor instead.

func (*Standards) GetStandards

func (x *Standards) GetStandards() []*ContractStandard

func (*Standards) ProtoMessage

func (*Standards) ProtoMessage()

func (*Standards) ProtoReflect

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

func (*Standards) Reset

func (x *Standards) Reset()

func (*Standards) String

func (x *Standards) String() string

Jump to

Keyboard shortcuts

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