contracts_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: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_contracts_constructor_proto protoreflect.FileDescriptor
View Source
var File_contracts_contract_proto protoreflect.FileDescriptor
View Source
var File_contracts_proxy_proto protoreflect.FileDescriptor
View Source
var File_contracts_service_parameters_proto protoreflect.FileDescriptor
View Source
var File_contracts_service_proto protoreflect.FileDescriptor
View Source
var File_contracts_vulnerability_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "unpack.v1.contracts.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _Service_Get_Handler,
		},
		{
			MethodName: "Unpack",
			Handler:    _Service_Unpack_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "contracts/service.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type Constructor

type Constructor struct {
	SignatureRaw string                 `protobuf:"bytes,2,opt,name=signature_raw,json=signatureRaw,proto3" json:"signature_raw,omitempty"` // Raw signature of the constructor.
	Arguments    []*ConstructorArgument `protobuf:"bytes,3,rep,name=arguments,proto3" json:"arguments,omitempty"`                           // Arguments of the constructor.
	// contains filtered or unexported fields
}

Represents a contract's constructor details.

func (*Constructor) Descriptor deprecated

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

Deprecated: Use Constructor.ProtoReflect.Descriptor instead.

func (*Constructor) GetArguments

func (x *Constructor) GetArguments() []*ConstructorArgument

func (*Constructor) GetSignatureRaw

func (x *Constructor) GetSignatureRaw() string

func (*Constructor) ProtoMessage

func (*Constructor) ProtoMessage()

func (*Constructor) ProtoReflect

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

func (*Constructor) Reset

func (x *Constructor) Reset()

func (*Constructor) String

func (x *Constructor) String() string

type ConstructorArgument

type ConstructorArgument struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`        // Name of the argument.
	Type    string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`        // Type of the argument.
	Value   string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`      // Value of the argument.
	Indexed bool   `protobuf:"varint,4,opt,name=indexed,proto3" json:"indexed,omitempty"` // Indicates if the argument is indexed.
	// contains filtered or unexported fields
}

Represents an argument of a contract's constructor.

func (*ConstructorArgument) Descriptor deprecated

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

Deprecated: Use ConstructorArgument.ProtoReflect.Descriptor instead.

func (*ConstructorArgument) GetIndexed

func (x *ConstructorArgument) GetIndexed() bool

func (*ConstructorArgument) GetName

func (x *ConstructorArgument) GetName() string

func (*ConstructorArgument) GetType

func (x *ConstructorArgument) GetType() string

func (*ConstructorArgument) GetValue

func (x *ConstructorArgument) GetValue() string

func (*ConstructorArgument) ProtoMessage

func (*ConstructorArgument) ProtoMessage()

func (*ConstructorArgument) ProtoReflect

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

func (*ConstructorArgument) Reset

func (x *ConstructorArgument) Reset()

func (*ConstructorArgument) String

func (x *ConstructorArgument) String() string

type Contract

type Contract struct {
	Uuid              string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`                                                    // Unique identifier for the contract.
	NetworkId         int64  `protobuf:"varint,2,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"`                        // Network ID associated with the contract.
	Name              string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`                                                    // Name of the contract.
	Address           string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`                                              // Address of the contract.
	License           string `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"`                                              // License associated with the contract.
	Language          string `protobuf:"bytes,6,opt,name=language,proto3" json:"language,omitempty"`                                            // Programming language used for the contract.
	ExecutionBytecode string `protobuf:"bytes,7,opt,name=execution_bytecode,json=executionBytecode,proto3" json:"execution_bytecode,omitempty"` // Execution bytecode of the contract.
	DeployedBytecode  string `protobuf:"bytes,8,opt,name=deployed_bytecode,json=deployedBytecode,proto3" json:"deployed_bytecode,omitempty"`    // Deployed bytecode of the contract.
	BlockNumber       int64  `protobuf:"varint,9,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`                  // Block number where the contract was deployed.
	BlockHash         string `protobuf:"bytes,10,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`                        // Hash of the block where the contract was deployed.
	TransactionHash   string `protobuf:"bytes,11,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"`      // Transaction hash of the contract deployment.
	Verified          bool   `protobuf:"varint,12,opt,name=verified,proto3" json:"verified,omitempty"`                                          // Indicates if the contract is verified.
	CompilerVersion   string `protobuf:"bytes,13,opt,name=compiler_version,json=compilerVersion,proto3" json:"compiler_version,omitempty"`      // Version of the compiler used.
	EvmVersion        string `protobuf:"bytes,14,opt,name=evm_version,json=evmVersion,proto3" json:"evm_version,omitempty"`                     // Version of the EVM used.
	SolgoVersion      string `protobuf:"bytes,15,opt,name=solgo_version,json=solgoVersion,proto3" json:"solgo_version,omitempty"`               // Version of the Solgo, used to decompile contract.
	Optimized         bool   `protobuf:"varint,16,opt,name=optimized,proto3" json:"optimized,omitempty"`                                        // Indicates if the contract is optimized.
	OptimizationRuns  int32  `protobuf:"varint,17,opt,name=optimization_runs,json=optimizationRuns,proto3" json:"optimization_runs,omitempty"`  // Number of optimization runs.
	// List of possible contract types associated.
	PossibleContractTypes []string `` /* 127-byte string literal not displayed */
	// Total number of contracts discovered in the IR.
	ContractsCount int32 `protobuf:"varint,19,opt,name=contracts_count,json=contractsCount,proto3" json:"contracts_count,omitempty"`
	// List of Ethereum Improvement Proposals (EIPs) associated with this IR.
	Standards []*ir.EIP `protobuf:"bytes,20,rep,name=standards,proto3" json:"standards,omitempty"`
	// Metadata URLs associated with the contract.
	MetadataUrls []string `protobuf:"bytes,21,rep,name=metadata_urls,json=metadataUrls,proto3" json:"metadata_urls,omitempty"`
	// Implementations associated with the contract.
	Implementations []*ProxyImplementation `protobuf:"bytes,22,rep,name=implementations,proto3" json:"implementations,omitempty"`
	// Constructor details of the contract.
	Constructor *Constructor `protobuf:"bytes,23,opt,name=constructor,proto3" json:"constructor,omitempty"`
	// Indicates if the contract has vulnerabilities.
	HasVulnerabilities bool `protobuf:"varint,24,opt,name=has_vulnerabilities,json=hasVulnerabilities,proto3" json:"has_vulnerabilities,omitempty"`
	// Metrics of vulnerabilities associated with the contract.
	VulnerabilityMetrics []*VulnerabilityMetric `protobuf:"bytes,25,rep,name=vulnerability_metrics,json=vulnerabilityMetrics,proto3" json:"vulnerability_metrics,omitempty"`
	// Vulnerabilities associated with the contract.
	Vulnerabilities []*Vulnerability `protobuf:"bytes,26,rep,name=vulnerabilities,proto3" json:"vulnerabilities,omitempty"`
	// ABI of the contract in raw JSON format.
	Abi             string           `protobuf:"bytes,27,opt,name=abi,proto3" json:"abi,omitempty"`
	Sources         *sources.Sources `protobuf:"bytes,28,opt,name=sources,proto3" json:"sources,omitempty"`
	IsProxy         bool             `protobuf:"varint,29,opt,name=is_proxy,json=isProxy,proto3" json:"is_proxy,omitempty"`
	SelfDestructed  bool             `protobuf:"varint,30,opt,name=self_destructed,json=selfDestructed,proto3" json:"self_destructed,omitempty"`
	ProcessedStates []string         `protobuf:"bytes,31,rep,name=processed_states,json=processedStates,proto3" json:"processed_states,omitempty"`
	FailedStates    []string         `protobuf:"bytes,32,rep,name=failed_states,json=failedStates,proto3" json:"failed_states,omitempty"`
	Processed       bool             `protobuf:"varint,33,opt,name=processed,proto3" json:"processed,omitempty"`
	Partial         bool             `protobuf:"varint,34,opt,name=partial,proto3" json:"partial,omitempty"`
	// contains filtered or unexported fields
}

Represents details of a contract.

func (*Contract) Descriptor deprecated

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

Deprecated: Use Contract.ProtoReflect.Descriptor instead.

func (*Contract) GetAbi

func (x *Contract) GetAbi() string

func (*Contract) GetAddress

func (x *Contract) GetAddress() string

func (*Contract) GetBlockHash

func (x *Contract) GetBlockHash() string

func (*Contract) GetBlockNumber

func (x *Contract) GetBlockNumber() int64

func (*Contract) GetCompilerVersion

func (x *Contract) GetCompilerVersion() string

func (*Contract) GetConstructor

func (x *Contract) GetConstructor() *Constructor

func (*Contract) GetContractsCount

func (x *Contract) GetContractsCount() int32

func (*Contract) GetDeployedBytecode

func (x *Contract) GetDeployedBytecode() string

func (*Contract) GetEvmVersion

func (x *Contract) GetEvmVersion() string

func (*Contract) GetExecutionBytecode

func (x *Contract) GetExecutionBytecode() string

func (*Contract) GetFailedStates added in v0.3.5

func (x *Contract) GetFailedStates() []string

func (*Contract) GetHasVulnerabilities

func (x *Contract) GetHasVulnerabilities() bool

func (*Contract) GetImplementations added in v0.3.5

func (x *Contract) GetImplementations() []*ProxyImplementation

func (*Contract) GetIsProxy added in v0.3.3

func (x *Contract) GetIsProxy() bool

func (*Contract) GetLanguage

func (x *Contract) GetLanguage() string

func (*Contract) GetLicense

func (x *Contract) GetLicense() string

func (*Contract) GetMetadataUrls

func (x *Contract) GetMetadataUrls() []string

func (*Contract) GetName

func (x *Contract) GetName() string

func (*Contract) GetNetworkId

func (x *Contract) GetNetworkId() int64

func (*Contract) GetOptimizationRuns

func (x *Contract) GetOptimizationRuns() int32

func (*Contract) GetOptimized

func (x *Contract) GetOptimized() bool

func (*Contract) GetPartial added in v0.3.5

func (x *Contract) GetPartial() bool

func (*Contract) GetPossibleContractTypes

func (x *Contract) GetPossibleContractTypes() []string

func (*Contract) GetProcessed added in v0.3.5

func (x *Contract) GetProcessed() bool

func (*Contract) GetProcessedStates added in v0.3.5

func (x *Contract) GetProcessedStates() []string

func (*Contract) GetSelfDestructed added in v0.3.5

func (x *Contract) GetSelfDestructed() bool

func (*Contract) GetSolgoVersion added in v0.3.5

func (x *Contract) GetSolgoVersion() string

func (*Contract) GetSources added in v0.3.3

func (x *Contract) GetSources() *sources.Sources

func (*Contract) GetStandards

func (x *Contract) GetStandards() []*ir.EIP

func (*Contract) GetTransactionHash

func (x *Contract) GetTransactionHash() string

func (*Contract) GetUuid

func (x *Contract) GetUuid() string

func (*Contract) GetVerified

func (x *Contract) GetVerified() bool

func (*Contract) GetVulnerabilities

func (x *Contract) GetVulnerabilities() []*Vulnerability

func (*Contract) GetVulnerabilityMetrics

func (x *Contract) GetVulnerabilityMetrics() []*VulnerabilityMetric

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 Element

type Element struct {
	Name           string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`                                            // Name of the element.
	Type           string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`                                            // Type of the element.
	Start          int32  `protobuf:"varint,3,opt,name=start,proto3" json:"start,omitempty"`                                         // Starting position of the element.
	Length         int32  `protobuf:"varint,4,opt,name=length,proto3" json:"length,omitempty"`                                       // Length of the element.
	StartingColumn int32  `protobuf:"varint,5,opt,name=starting_column,json=startingColumn,proto3" json:"starting_column,omitempty"` // Starting column of the element.
	EndingColumn   int32  `protobuf:"varint,6,opt,name=ending_column,json=endingColumn,proto3" json:"ending_column,omitempty"`       // Ending column of the element.
	// contains filtered or unexported fields
}

Represents an element associated with a vulnerability.

func (*Element) Descriptor deprecated

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

Deprecated: Use Element.ProtoReflect.Descriptor instead.

func (*Element) GetEndingColumn

func (x *Element) GetEndingColumn() int32

func (*Element) GetLength

func (x *Element) GetLength() int32

func (*Element) GetName

func (x *Element) GetName() string

func (*Element) GetStart

func (x *Element) GetStart() int32

func (*Element) GetStartingColumn

func (x *Element) GetStartingColumn() int32

func (*Element) GetType

func (x *Element) GetType() string

func (*Element) ProtoMessage

func (*Element) ProtoMessage()

func (*Element) ProtoReflect

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

func (*Element) Reset

func (x *Element) Reset()

func (*Element) String

func (x *Element) String() string

type ProxyImplementation added in v0.3.5

type ProxyImplementation struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`  // Address of the proxy implementation.
	Current bool   `protobuf:"varint,2,opt,name=current,proto3" json:"current,omitempty"` // Is current proxy implementation active (currently used) or not.
	// contains filtered or unexported fields
}

Represents a contract's implementation details.

func (*ProxyImplementation) Descriptor deprecated added in v0.3.5

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

Deprecated: Use ProxyImplementation.ProtoReflect.Descriptor instead.

func (*ProxyImplementation) GetAddress added in v0.3.5

func (x *ProxyImplementation) GetAddress() string

func (*ProxyImplementation) GetCurrent added in v0.3.5

func (x *ProxyImplementation) GetCurrent() bool

func (*ProxyImplementation) ProtoMessage added in v0.3.5

func (*ProxyImplementation) ProtoMessage()

func (*ProxyImplementation) ProtoReflect added in v0.3.5

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

func (*ProxyImplementation) Reset added in v0.3.5

func (x *ProxyImplementation) Reset()

func (*ProxyImplementation) String added in v0.3.5

func (x *ProxyImplementation) String() string

type Request

type Request struct {

	// Identifier for the blockchain chain.
	NetworkId int64 `protobuf:"varint,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"`
	// Address associated with the transaction.
	Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// contains filtered or unexported fields
}

Represents a contract request message with details about a transaction.

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetAddresses

func (x *Request) GetAddresses() []string

func (*Request) GetNetworkId

func (x *Request) GetNetworkId() int64

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {

	// Status of the transaction.
	Status *common.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// Identifier for the blockchain chain.
	NetworkId int64 `protobuf:"varint,2,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"`
	// Contract details associated with the transaction.
	Contracts []*Contract `protobuf:"bytes,4,rep,name=contracts,proto3" json:"contracts,omitempty"`
	// contains filtered or unexported fields
}

Represents a contract response message with details about a transaction.

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetContracts

func (x *Response) GetContracts() []*Contract

func (*Response) GetNetworkId

func (x *Response) GetNetworkId() int64

func (*Response) GetStatus

func (x *Response) GetStatus() *common.Status

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type ServiceClient

type ServiceClient interface {
	Get(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	Unpack(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

ServiceClient is the client API for Service service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	Get(context.Context, *Request) (*Response, error)
	Unpack(context.Context, *Request) (*Response, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) Get

func (UnimplementedServiceServer) Unpack

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

type Vulnerability

type Vulnerability struct {
	Check       string     `protobuf:"bytes,1,opt,name=check,proto3" json:"check,omitempty"`             // Check associated with the vulnerability.
	Impact      string     `protobuf:"bytes,2,opt,name=impact,proto3" json:"impact,omitempty"`           // Impact of the vulnerability.
	Description string     `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // Description of the vulnerability.
	Confidence  string     `protobuf:"bytes,4,opt,name=confidence,proto3" json:"confidence,omitempty"`   // Confidence level of the vulnerability detection.
	Elements    []*Element `protobuf:"bytes,5,rep,name=elements,proto3" json:"elements,omitempty"`       // Elements associated with the vulnerability.
	// contains filtered or unexported fields
}

Represents details of a vulnerability.

func (*Vulnerability) Descriptor deprecated

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

Deprecated: Use Vulnerability.ProtoReflect.Descriptor instead.

func (*Vulnerability) GetCheck

func (x *Vulnerability) GetCheck() string

func (*Vulnerability) GetConfidence

func (x *Vulnerability) GetConfidence() string

func (*Vulnerability) GetDescription

func (x *Vulnerability) GetDescription() string

func (*Vulnerability) GetElements

func (x *Vulnerability) GetElements() []*Element

func (*Vulnerability) GetImpact

func (x *Vulnerability) GetImpact() string

func (*Vulnerability) ProtoMessage

func (*Vulnerability) ProtoMessage()

func (*Vulnerability) ProtoReflect

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

func (*Vulnerability) Reset

func (x *Vulnerability) Reset()

func (*Vulnerability) String

func (x *Vulnerability) String() string

type VulnerabilityMetric

type VulnerabilityMetric struct {
	Level string `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"`  // Severity level of the vulnerability.
	Count int32  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // Count of vulnerabilities of this severity level.
	// contains filtered or unexported fields
}

Represents a vulnerability metric.

func (*VulnerabilityMetric) Descriptor deprecated

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

Deprecated: Use VulnerabilityMetric.ProtoReflect.Descriptor instead.

func (*VulnerabilityMetric) GetCount

func (x *VulnerabilityMetric) GetCount() int32

func (*VulnerabilityMetric) GetLevel

func (x *VulnerabilityMetric) GetLevel() string

func (*VulnerabilityMetric) ProtoMessage

func (*VulnerabilityMetric) ProtoMessage()

func (*VulnerabilityMetric) ProtoReflect

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

func (*VulnerabilityMetric) Reset

func (x *VulnerabilityMetric) Reset()

func (*VulnerabilityMetric) String

func (x *VulnerabilityMetric) String() string

Jump to

Keyboard shortcuts

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