rpc

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterService

func RegisterService(ctx *cli.Context, baseService service.Service) (service.Service, error)

Types

type Contract

type Contract struct {
	Id                   uuid.UUID             `json:"id"`
	NetworkId            model_types.BigInt    `json:"networkId"`
	BlockNumber          model_types.BigInt    `json:"blockNumber"`
	BlockHash            model_types.Hash      `json:"blockHash"`
	TransactionHash      model_types.Hash      `json:"transactionHash"`
	DeployerAddress      model_types.Address   `json:"deployerAddress"`
	Address              model_types.Address   `json:"address"`
	Name                 string                `json:"name"`
	Standards            model_types.Standards `json:"standards"`
	Proxy                bool                  `json:"proxy"`
	ProxyImplementations model_types.Addresses `json:"proxyImplementations"`
	License              string                `json:"license"`
	CompilerVersion      string                `json:"compilerVersion"`
	SolgoVersion         string                `json:"solgoVersion"`
	Optimized            bool                  `json:"optimized"`
	OptimizationRuns     uint64                `json:"optimizationRuns"`
	EVMVersion           string                `json:"evmVersion"`
	ABI                  string                `json:"abi"`
	SourceEntryPoint     string                `json:"entryPoint"`
	Sources              []*solgo.SourceUnit   `json:"sources"`
	Verified             bool                  `json:"verified"`
	SourcesProvider      string                `json:"sourcesProvider"`
	VerificationProvider string                `json:"verificationProvider"`
	ExecutionBytecode    string                `json:"executionBytecode"`
	Bytecode             string                `json:"bytecode"`
	SafetyState          utils.SafetyStateType `json:"safetyState"`
	SourceAvailable      bool                  `json:"sourceAvailable"`
	SelfDestructed       bool                  `json:"selfDestructed"`
	CompletedStates      model_types.States    `json:"completedStates"`
	FailedStates         model_types.States    `json:"failedStates"`
	Processed            bool                  `json:"processed"`
	Partial              bool                  `json:"partial"`
	CreatedAt            time.Time             `json:"created_at"`
	UpdatedAt            time.Time             `json:"updated_at"`
}

type Log

type Log struct {
	Address        *utils.NamedAddr       `json:"address"`
	Topics         []common.Hash          `json:"topics"`
	Removed        bool                   `json:"removed"`
	Signature      common.Hash            `json:"signature"`
	EventSignature string                 `json:"eventSignature"`
	Name           string                 `json:"name"`
	Type           utils.LogEventType     `json:"type"`
	Abi            string                 `json:"abi"`
	DecodedTopics  []bytecode.Topic       `json:"decodedTopics"`
	RawData        string                 `json:"rawData"`
	Data           map[string]interface{} `json:"data"`
	Anonymous      bool                   `json:"anonymous"`
	AST            *ast.Event             `json:"ast"`
}

type Receipt

type Receipt struct {
	BlockNumber       *big.Int       `json:"blockNumber"`
	BlockHash         common.Hash    `json:"blockHash"`
	ContractAddress   common.Address `json:"contractAddress"`
	TransactionIndex  uint           `json:"transactionIndex"`
	GasUsed           uint64         `json:"gasUsed"`
	CumulativeGasUsed uint64         `json:"cumulativeGasUsed"`
	EffectiveGasPrice *big.Int       `json:"effectiveGasPrice"`
	BlobGasUsed       uint64         `json:"blobGasUsed"`
	BlobGasPrice      *big.Int       `json:"blobGasPrice"`
	Status            uint64         `json:"status"`
	Bloom             types.Bloom    `json:"bloom"`
	PostState         string         `json:"postState"`
}

type Service

type Service struct {
	*service.BaseService
}

func NewService

func NewService(ctx *cli.Context, baseService *service.BaseService) (*Service, error)

func ToRPCService

func ToRPCService(service service.Service) *Service

func (*Service) Dependencies

func (s *Service) Dependencies() map[service.DependencyName]service.Option

func (*Service) GenerateSpecs

func (s *Service) GenerateSpecs() error

func (*Service) RegisterNamespaces

func (s *Service) RegisterNamespaces() error

func (*Service) Start

func (s *Service) Start(network utils.Network, networkId utils.NetworkID) error

func (*Service) Stop

func (s *Service) Stop() error

type StatsResponse

type StatsResponse struct {
	ContractsCount uint64 `json:"contractsCount"`
}

type Transaction

type Transaction struct {
	Hash              common.Hash                 `json:"hash"`
	Type              uint8                       `json:"type"`
	Sender            *utils.NamedAddr            `json:"sender"`
	Recipient         *utils.NamedAddr            `json:"recipient"`
	AccessList        types.AccessList            `json:"accessList"`
	Nonce             uint64                      `json:"nonce"`
	Protected         bool                        `json:"protected"`
	IsPending         bool                        `json:"isPending"`
	Value             *big.Int                    `json:"value"`
	Cost              *big.Int                    `json:"cost"`
	Gas               uint64                      `json:"gas"`
	GasPrice          *big.Int                    `json:"gasPrice"`
	GasFeeCap         *big.Int                    `json:"gasFeeCap"`
	GasTipCap         *big.Int                    `json:"gasTipCap"`
	BlobGas           uint64                      `json:"blobGas"`
	BlobGasFeeCap     *big.Int                    `json:"blobGasFeeCap"`
	BlobHashes        []common.Hash               `json:"blobHashes"`
	BlobTxSidecar     *types.BlobTxSidecar        `json:"blobTxSidecar"`
	RawSignature      *TransactionRawSignature    `json:"rawSignature"`
	Signature         string                      `json:"signature"`
	FunctionName      string                      `json:"functionName"`
	FunctionSignature string                      `json:"functionSignature"`
	Implemented       bool                        `json:"implemented"`
	StateMutability   string                      `json:"stateMutability"`
	Visibility        string                      `json:"visibility"`
	Virtual           bool                        `json:"virtual"`
	MethodType        utils.TransactionMethodType `json:"methodType"`
	MethodPayload     map[string]interface{}      `json:"methodPayload"`
	MethodAbi         string                      `json:"methodAbi"`
	Data              string                      `json:"data"`
	Time              time.Time                   `json:"time"`
	Receipt           *Receipt                    `json:"receipt"`
	Logs              []Log                       `json:"logs"`
	AST               *ast.Function               `json:"ast"`
}

type TransactionRawSignature

type TransactionRawSignature struct {
	V, R, S *big.Int
}

Jump to

Keyboard shortcuts

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