restast

package
v0.9.9-rc1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AstServiceName rest.ServiceName = "ast"

AstServiceName defines the service name for the AST service.

Functions

func GetAstBuilder

func GetAstBuilder(ctx context.Context, contract *models.Contract, networkId utils.NetworkID, address common.Address) (*ast.ASTBuilder, error)

func RegisterGetAstHandler

func RegisterGetAstHandler(n *Namespace) error

RegisterGetAstHandler retrieves the Abstract Syntax Tree (AST) representation of a Solidity smart contract deployed on a specified network at a given address.

func RegisterGetConstantsHandler

func RegisterGetConstantsHandler(n *Namespace) error

RegisterGetConstantsHandler registers the endpoint to retrieve constant variables in a smart contract

func RegisterGetConstructorsHandler

func RegisterGetConstructorsHandler(n *Namespace) error

RegisterGetConstructorsHandler registers the endpoint to retrieve constructors in a smart contract

func RegisterGetContractsHandler

func RegisterGetContractsHandler(n *Namespace) error

RegisterGetContractsHandler registers the endpoint to retrieve contract definitions in a smart contract

func RegisterGetDocsHandler

func RegisterGetDocsHandler(n *Namespace) error

RegisterGetDocsHandler registers the endpoint to retrieve documentation comments from the AST of a smart contract

func RegisterGetEnumsHandler

func RegisterGetEnumsHandler(n *Namespace) error

RegisterGetEnumsHandler registers the endpoint to retrieve enums in a smart contract

func RegisterGetErrorsHandler

func RegisterGetErrorsHandler(n *Namespace) error

RegisterGetErrorsHandler registers the endpoint to retrieve error definitions in a smart contract

func RegisterGetEventsHandler

func RegisterGetEventsHandler(n *Namespace) error

RegisterGetEventsHandler registers the endpoint to retrieve event definitions in a smart contract

func RegisterGetFunctionsHandler

func RegisterGetFunctionsHandler(n *Namespace) error

RegisterGetFunctionsHandler registers the endpoint to retrieve function definitions in a smart contract

func RegisterGetImportsHandler

func RegisterGetImportsHandler(n *Namespace) error

RegisterGetImportsHandler registers the endpoint to retrieve import statements in a smart contract

func RegisterGetInterfacesHandler

func RegisterGetInterfacesHandler(n *Namespace) error

RegisterGetInterfacesHandler registers the endpoint to retrieve interface definitions in a smart contract

func RegisterGetLibrariesHandler

func RegisterGetLibrariesHandler(n *Namespace) error

RegisterGetLibrariesHandler registers the endpoint to retrieve library definitions in a smart contract

func RegisterGetLicenseHandler

func RegisterGetLicenseHandler(n *Namespace) error

RegisterGetLicenseHandler registers the endpoint to retrieve the license information of a smart contract

func RegisterGetStateVariablesHandler

func RegisterGetStateVariablesHandler(n *Namespace) error

RegisterGetStateVariablesHandler registers the endpoint to retrieve state variable definitions in a smart contract

func RegisterGetStatsHandler

func RegisterGetStatsHandler(n *Namespace) error

RegisterGetStatsHandler registers an endpoint to retrieve statistics for a smart contract AST on a specified network by address.

func RegisterGetStructsHandler

func RegisterGetStructsHandler(n *Namespace) error

RegisterGetStructsHandler registers the endpoint to retrieve struct definitions in a smart contract

Types

type InputNetworkAddress

type InputNetworkAddress struct {
	NetworkId utils.NetworkID `json:"networkId" path:"networkId" maxLength:"2" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet)
	Address   common.Address  ``                                                                             // Address specifies the smart contract address
	/* 135-byte string literal not displayed */
}

InputNetworkAddress represents the input parameters required to specify a network and contract address.

type Namespace

type Namespace struct {
	*rest.Server
	// contains filtered or unexported fields
}

Namespace represents a service namespace containing configuration and dependencies for the AST service.

func NewNamespace

func NewNamespace(server *rest.Server, db db.Adapter, pool *clients.ClientPool, nats *nats.Conn, cache *cache.Redis) *Namespace

NewNamespace creates a new instance of Namespace with the provided server, database adapter, client pool, NATS connection, and Redis cache.

func (*Namespace) GetName

func (s *Namespace) GetName() rest.ServiceName

GetName returns the service name for the AST namespace.

func (*Namespace) RegisterHandlers

func (s *Namespace) RegisterHandlers() error

RegisterHandlers registers all the necessary handlers for the AST namespace.

Jump to

Keyboard shortcuts

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