Documentation
¶
Index ¶
- Variables
- func GetAstBuilder(ctx context.Context, contract *models.Contract, networkId utils.NetworkID, ...) (*ast.ASTBuilder, error)
- func RegisterGetAstHandler(n *Namespace) error
- func RegisterGetConstantsHandler(n *Namespace) error
- func RegisterGetConstructorsHandler(n *Namespace) error
- func RegisterGetContractsHandler(n *Namespace) error
- func RegisterGetDocsHandler(n *Namespace) error
- func RegisterGetEnumsHandler(n *Namespace) error
- func RegisterGetErrorsHandler(n *Namespace) error
- func RegisterGetEventsHandler(n *Namespace) error
- func RegisterGetFunctionsHandler(n *Namespace) error
- func RegisterGetImportsHandler(n *Namespace) error
- func RegisterGetInterfacesHandler(n *Namespace) error
- func RegisterGetLibrariesHandler(n *Namespace) error
- func RegisterGetLicenseHandler(n *Namespace) error
- func RegisterGetStateVariablesHandler(n *Namespace) error
- func RegisterGetStatsHandler(n *Namespace) error
- func RegisterGetStructsHandler(n *Namespace) error
- type InputNetworkAddress
- type Namespace
Constants ¶
This section is empty.
Variables ¶
var AstServiceName rest.ServiceName = "ast"
AstServiceName defines the service name for the AST service.
Functions ¶
func GetAstBuilder ¶
func RegisterGetAstHandler ¶
RegisterGetAstHandler retrieves the Abstract Syntax Tree (AST) representation of a Solidity smart contract deployed on a specified network at a given address.
func RegisterGetConstantsHandler ¶
RegisterGetConstantsHandler registers the endpoint to retrieve constant variables in a smart contract
func RegisterGetConstructorsHandler ¶
RegisterGetConstructorsHandler registers the endpoint to retrieve constructors in a smart contract
func RegisterGetContractsHandler ¶
RegisterGetContractsHandler registers the endpoint to retrieve contract definitions in a smart contract
func RegisterGetDocsHandler ¶
RegisterGetDocsHandler registers the endpoint to retrieve documentation comments from the AST of a smart contract
func RegisterGetEnumsHandler ¶
RegisterGetEnumsHandler registers the endpoint to retrieve enums in a smart contract
func RegisterGetErrorsHandler ¶
RegisterGetErrorsHandler registers the endpoint to retrieve error definitions in a smart contract
func RegisterGetEventsHandler ¶
RegisterGetEventsHandler registers the endpoint to retrieve event definitions in a smart contract
func RegisterGetFunctionsHandler ¶
RegisterGetFunctionsHandler registers the endpoint to retrieve function definitions in a smart contract
func RegisterGetImportsHandler ¶
RegisterGetImportsHandler registers the endpoint to retrieve import statements in a smart contract
func RegisterGetInterfacesHandler ¶
RegisterGetInterfacesHandler registers the endpoint to retrieve interface definitions in a smart contract
func RegisterGetLibrariesHandler ¶
RegisterGetLibrariesHandler registers the endpoint to retrieve library definitions in a smart contract
func RegisterGetLicenseHandler ¶
RegisterGetLicenseHandler registers the endpoint to retrieve the license information of a smart contract
func RegisterGetStateVariablesHandler ¶
RegisterGetStateVariablesHandler registers the endpoint to retrieve state variable definitions in a smart contract
func RegisterGetStatsHandler ¶
RegisterGetStatsHandler registers an endpoint to retrieve statistics for a smart contract AST on a specified network by address.
func RegisterGetStructsHandler ¶
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 ¶
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 ¶
RegisterHandlers registers all the necessary handlers for the AST namespace.