Documentation ¶
Index ¶
- Variables
- func RegisterGetContractByTransactionHashHandler(n *Namespace) error
- func RegisterGetContractsByAddressesHandler(n *Namespace) error
- func RegisterGetContractsByBlockNumberHandler(n *Namespace) error
- func RegisterGetContractsByDeployerHandler(n *Namespace) error
- func RegisterGetContractsByStandardsHandler(n *Namespace) error
- func RegisterGetProxyContractsByAddressesHandler(n *Namespace) error
- func RegisterListContractsHandler(n *Namespace) error
- type InputNetworkAddress
- type InputNetworkAddressPaginated
- type InputNetworkAddresses
- type InputNetworkBlockPaginated
- type InputNetworkHash
- type InputNetworkPaginated
- type InputNetworkStandardsPaginated
- type Namespace
Constants ¶
This section is empty.
Variables ¶
var ContractsServiceName rest.ServiceName = "contracts"
ContractsServiceName defines the service name for the Contracts service.
Functions ¶
func RegisterGetContractByTransactionHashHandler ¶
RegisterGetContractByTransactionHashHandler registers the endpoint to retrieve a contract by transaction hash
func RegisterGetContractsByAddressesHandler ¶
RegisterGetContractsByAddressesHandler registers the endpoint to retrieve contracts by a list of addresses
func RegisterGetContractsByBlockNumberHandler ¶
RegisterGetContractsByBlockNumberHandler registers the endpoint to retrieve contracts by block number
func RegisterGetContractsByDeployerHandler ¶
RegisterGetContractsByDeployerHandler registers the endpoint to retrieve contracts by deployer address
func RegisterGetContractsByStandardsHandler ¶
RegisterGetContractsByStandardsHandler registers the endpoint to retrieve contracts by standards
func RegisterGetProxyContractsByAddressesHandler ¶
RegisterGetProxyContractsByAddressesHandler registers the endpoint to retrieve list of proxy implementation contracts by a contract addresses
func RegisterListContractsHandler ¶
RegisterListContractsHandler registers the endpoint to retrieve contracts
Types ¶
type InputNetworkAddress ¶
type InputNetworkAddress struct { NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet) Address common.Address `` // Address specifies the account address /* 135-byte string literal not displayed */ }
InputNetworkAddress represents the input parameters required to specify a network and address.
type InputNetworkAddressPaginated ¶
type InputNetworkAddressPaginated struct { NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet) Address common.Address `` // Address specifies the deployer address /* 135-byte string literal not displayed */ Limit uint `json:"limit" query:"limit" example:"10" doc:"Limit for the number of contracts to return"` // Limit specifies the number of contracts to return Offset uint `json:"offset" query:"offset" example:"0" doc:"Offset for pagination"` // Offset specifies the offset for pagination }
InputNetworkAddressPaginated represents the input parameters required to specify a network, address, and pagination.
type InputNetworkAddresses ¶
type InputNetworkAddresses struct { NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet) Addresses []string `` // Addresses specifies the list of contract addresses /* 158-byte string literal not displayed */ }
InputNetworkAddresses represents the input parameters required to specify a network and a list of addresses.
func (*InputNetworkAddresses) ToAddresses ¶
func (t *InputNetworkAddresses) ToAddresses() []common.Address
type InputNetworkBlockPaginated ¶
type InputNetworkBlockPaginated struct { NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet) BlockNumber int64 `json:"blockNumber" path:"blockNumber" example:"18464515" doc:"Block number"` // Block number specifies the block number Limit uint `json:"limit" query:"limit" example:"10" default:"10" doc:"Limit for the number of contracts to return"` // Limit specifies the number of contracts to return Offset uint `json:"offset" query:"offset" example:"0" default:"0" doc:"Offset for pagination"` // Offset specifies the offset for pagination }
InputNetworkBlockPaginated represents the input parameters required to specify a network, block number, and pagination.
type InputNetworkHash ¶
type InputNetworkHash struct { NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet) Hash common.Hash `json:"hash" path:"hash" example:"0xbac4e10bdd8aed7b7728e4e8c445f03e27597378cc3a70fba29a93b7d6fe7f93" doc:"Transaction hash"` // Hash specifies the transaction hash }
InputNetworkHash represents the input parameters required to specify a network and transaction hash.
type InputNetworkPaginated ¶
type InputNetworkPaginated struct { NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet) Limit uint `json:"limit" query:"limit" example:"10" doc:"Limit for the number of contracts to return"` // Limit specifies the number of accounts to return Offset uint `json:"offset" query:"offset" example:"0" doc:"Offset for pagination"` // Offset specifies the offset for pagination }
InputNetworkPaginated represents the input parameters required to specify a network, limit and offset.
type InputNetworkStandardsPaginated ¶
type InputNetworkStandardsPaginated struct { NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet) Standards []string `json:"standards" query:"standards" example:"[\"ERC20\"]" uniqueItems:"true" minItems:"1" doc:"List of standards to filter by"` // Standards specifies the list of standards to filter by Limit uint `json:"limit" query:"limit" example:"10" default:"10" doc:"Limit for the number of contracts to return"` // Limit specifies the number of contracts to return Offset uint `json:"offset" query:"offset" example:"0" default:"0" doc:"Offset for pagination"` // Offset specifies the offset for pagination }
InputNetworkStandardsPaginated represents the input parameters required to specify a network, standards, and pagination.
type Namespace ¶
Namespace represents a service namespace containing configuration and dependencies for the Contracts 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 Contracts namespace.
func (*Namespace) RegisterHandlers ¶
RegisterHandlers registers all the necessary handlers for the Accounts namespace.