Help us shape the future of Go! Take the 2026 Go Developer Survey

rpctypes

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Abi

type Abi struct {
	Raw        string       `json:"raw"`
	AbiMethods []abi.Method `json:"abiMethods"`
	Functions  []Function   `json:"functions"`
	Events     []Event      `json:"events"`
}

type Account

type Account struct {
	Id                             uuid.UUID       `json:"id"`
	NetworkId                      utils.NetworkID `json:"networkId"`
	Address                        common.Address  `json:"address"`
	CreationBlock                  *big.Int        `json:"creationBlock"`
	CreationTxHash                 common.Hash     `json:"creationTxHash"`
	Name                           string          `json:"name"`
	Ens                            string          `json:"ens"`
	Tags                           []string        `json:"tags"`
	Type                           string          `json:"type"`
	Balance                        string          `json:"balance"`
	Blacklisted                    bool            `json:"blacklisted"`
	BlacklistReasons               []string        `json:"blacklistReasons"`
	BlacklistContractReferences    []string        `json:"blacklistContractReferences"`
	BlacklistAccountReferences     []string        `json:"blacklistAccountReferences"`
	BlacklistTransactionReferences []string        `json:"blacklistTransactionReferences"`
	CompletedStates                []string        `json:"completedStates"`
	FailedStates                   []string        `json:"failedStates"`
	Processed                      bool            `json:"processed"`
	Partial                        bool            `json:"partial"`
	CreatedAt                      time.Time       `json:"createdAt"`
	UpdatedAt                      time.Time       `json:"updatedAt"`
}

type Ast

type Ast struct {
	NetworkId       *big.Int       `json:"networkId"`
	ContractId      uuid.UUID      `json:"contractId"`
	ContractAddress common.Address `json:"contractAddress"`
	Ast             *ast.RootNode  `json:"ast"`
}

type AstConstants

type AstConstants struct {
	NetworkId       *big.Int                        `json:"networkId"`
	ContractId      uuid.UUID                       `json:"contractId"`
	ContractAddress common.Address                  `json:"contractAddress"`
	Total           int                             `json:"total"`
	Constants       []*ast.StateVariableDeclaration `json:"constants"`
}

type AstConstructors

type AstConstructors struct {
	NetworkId        *big.Int           `json:"networkId"`
	ContractId       uuid.UUID          `json:"contractId"`
	ContractAddress  common.Address     `json:"contractAddress"`
	Total            int                `json:"total"`
	EntryConstructor *ast.Constructor   `json:"entryConstructor"`
	Constructors     []*ast.Constructor `json:"constructors"`
}

type AstContracts

type AstContracts struct {
	NetworkId       *big.Int                                      `json:"networkId"`
	ContractId      uuid.UUID                                     `json:"contractId"`
	ContractAddress common.Address                                `json:"contractAddress"`
	Imports         []*ast.SourceUnit[ast.Node[astpb.SourceUnit]] `json:"contracts"`
}

type AstDocs

type AstDocs struct {
	NetworkId       *big.Int       `json:"networkId"`
	ContractId      uuid.UUID      `json:"contractId"`
	ContractAddress common.Address `json:"contractAddress"`
	Docs            []*ast.Comment `json:"docs"`
}

type AstEnums

type AstEnums struct {
	NetworkId       *big.Int              `json:"networkId"`
	ContractId      uuid.UUID             `json:"contractId"`
	ContractAddress common.Address        `json:"contractAddress"`
	Total           int                   `json:"total"`
	Enums           []*ast.EnumDefinition `json:"enums"`
}

type AstErrors

type AstErrors struct {
	NetworkId       *big.Int               `json:"networkId"`
	ContractId      uuid.UUID              `json:"contractId"`
	ContractAddress common.Address         `json:"contractAddress"`
	Total           int                    `json:"total"`
	Errors          []*ast.ErrorDefinition `json:"errors"`
}

type AstEvents

type AstEvents struct {
	NetworkId       *big.Int               `json:"networkId"`
	ContractId      uuid.UUID              `json:"contractId"`
	ContractAddress common.Address         `json:"contractAddress"`
	Total           int                    `json:"total"`
	Events          []*ast.EventDefinition `json:"events"`
}

type AstFunctions

type AstFunctions struct {
	NetworkId       *big.Int        `json:"networkId"`
	ContractId      uuid.UUID       `json:"contractId"`
	ContractAddress common.Address  `json:"contractAddress"`
	Total           int             `json:"total"`
	Functions       []*ast.Function `json:"functions"`
}

type AstImports

type AstImports struct {
	NetworkId       *big.Int       `json:"networkId"`
	ContractId      uuid.UUID      `json:"contractId"`
	ContractAddress common.Address `json:"contractAddress"`
	Imports         []*ast.Import  `json:"imports"`
}

type AstInterfaces

type AstInterfaces struct {
	NetworkId       *big.Int                                      `json:"networkId"`
	ContractId      uuid.UUID                                     `json:"contractId"`
	ContractAddress common.Address                                `json:"contractAddress"`
	Imports         []*ast.SourceUnit[ast.Node[astpb.SourceUnit]] `json:"interfaces"`
}

type AstLibraries

type AstLibraries struct {
	NetworkId       *big.Int                                      `json:"networkId"`
	ContractId      uuid.UUID                                     `json:"contractId"`
	ContractAddress common.Address                                `json:"contractAddress"`
	Imports         []*ast.SourceUnit[ast.Node[astpb.SourceUnit]] `json:"libraries"`
}

type AstLicense

type AstLicense struct {
	License string `json:"license"`
}

type AstStat

type AstStat struct {
	Id                  uuid.UUID      `json:"id"`
	NetworkId           *big.Int       `json:"networkId"`
	ContractId          uuid.UUID      `json:"contractId"`
	ContractAddress     common.Address `json:"contractAddress"`
	UnitsCount          int64          `json:"unitsCount"`
	ContractsCount      int64          `json:"contractsCount"`
	InterfacesCount     int64          `json:"interfacesCount"`
	LibrariesCount      int64          `json:"librariesCount"`
	StateVariablesCount int64          `json:"stateVariablesCount"`
	FunctionsCount      int64          `json:"functionsCount"`
	EventsCount         int64          `json:"eventsCount"`
	Processed           bool           `json:"processed"`
	Partial             bool           `json:"partial"`
	CreatedAt           time.Time      `json:"createdAt"`
	UpdatedAt           time.Time      `json:"updatedAt"`
}

type AstStateVariables

type AstStateVariables struct {
	NetworkId       *big.Int                        `json:"networkId"`
	ContractId      uuid.UUID                       `json:"contractId"`
	ContractAddress common.Address                  `json:"contractAddress"`
	Total           int                             `json:"total"`
	Variables       []*ast.StateVariableDeclaration `json:"variables"`
}

type AstStructs

type AstStructs struct {
	NetworkId       *big.Int                `json:"networkId"`
	ContractId      uuid.UUID               `json:"contractId"`
	ContractAddress common.Address          `json:"contractAddress"`
	Total           int                     `json:"total"`
	Structs         []*ast.StructDefinition `json:"structs"`
}

type Cfg

type Cfg struct {
	Id              uuid.UUID      `json:"Id"`
	NetworkId       *big.Int       `json:"networkId"`
	ContractAddress common.Address `json:"contractAddress"`
	Mermaid         string         `json:"mermaid"`
	Processed       bool           `json:"processed"`
	Partial         bool           `json:"partial"`
	CreatedAt       time.Time      `json:"createdAt"`
	UpdatedAt       time.Time      `json:"updatedAt"`
}

type Constructor

type Constructor struct {
	Id              uuid.UUID           `json:"id"`
	NetworkId       utils.NetworkID     `json:"networkId"`
	ContractAddress common.Address      `json:"address"`
	Signature       string              `json:"signature"`
	Arguments       []bytecode.Argument `json:"arguments"`
	ArgumentsRaw    []interface{}       `json:"argumentsRaw"`
	Abi             string              `json:"abi"`
	Unit            *ir.Constructor     `json:"unit"`
	Processed       bool                `json:"processed"`
	Partial         bool                `json:"partial"`
	CreatedAt       time.Time           `json:"createdAt"`
	UpdatedAt       time.Time           `json:"updatedAt"`
}

type Contract

type Contract struct {
	Id                   uuid.UUID           `json:"id"`
	NetworkId            modeltypes.BigInt   `json:"networkId"`
	BlockNumber          modeltypes.BigInt   `json:"blockNumber"`
	BlockHash            modeltypes.Hash     `json:"blockHash"`
	TransactionHash      modeltypes.Hash     `json:"transactionHash"`
	DeployerAddress      modeltypes.Address  `json:"deployerAddress"`
	Address              modeltypes.Address  `json:"address"`
	Name                 string              `json:"name"`
	Standards            []string            `json:"standards"`
	Proxy                bool                `json:"proxy"`
	ProxyImplementations []string            `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          string              `json:"safetyState"`
	SourceAvailable      bool                `json:"sourceAvailable"`
	SelfDestructed       bool                `json:"selfDestructed"`
	CompletedStates      []string            `json:"completedStates"`
	FailedStates         []string            `json:"failedStates"`
	Processed            bool                `json:"processed"`
	Partial              bool                `json:"partial"`
	CreatedAt            time.Time           `json:"created_at"`
	UpdatedAt            time.Time           `json:"updated_at"`
}

type Event

type Event struct {
	Id                  uuid.UUID            `json:"id"`
	ContractAddress     string               `json:"contractAddress"`
	Name                string               `json:"name"`
	Signature           string               `json:"signature"`
	SignatureHex        string               `json:"signatureHex"`
	SignatureDefinition string               `json:"signatureDefinition"`
	Abi                 string               `json:"abi"`
	Anonymous           bool                 `json:"anonymous"`
	Unit                *ast.EventDefinition `json:"unit"`
	CreatedAt           time.Time            `json:"createdAt"`
	UpdatedAt           time.Time            `json:"updatedAt"`
}

type FullEvent

type FullEvent struct {
	Id                  uuid.UUID            `json:"id"`
	ContractAddress     string               `json:"contractAddress"`
	Name                string               `json:"name"`
	Signature           string               `json:"signature"`
	SignatureDefinition string               `json:"signatureDefinition"`
	Abi                 string               `json:"abi"`
	Anonymous           bool                 `json:"anonymous"`
	Unit                *ast.EventDefinition `json:"unit"`
	Processed           bool                 `json:"processed"`
	Partial             bool                 `json:"partial"`
	CreatedAt           time.Time            `json:"createdAt"`
	UpdatedAt           time.Time            `json:"updatedAt"`
}

type FullFunction

type FullFunction struct {
	Id                  uuid.UUID     `json:"id"`
	ContractAddress     string        `json:"contractAddress"`
	Name                string        `json:"name"`
	Signature           string        `json:"signature"`
	SignatureHex        string        `json:"signatureHex"`
	SignatureDefinition string        `json:"signatureDefinition"`
	Abi                 string        `json:"abi"`
	Implemented         bool          `json:"implemented"`
	Visibility          string        `json:"visibility"`
	Mutability          string        `json:"mutability"`
	Virtual             bool          `json:"virtual"`
	Unit                *ast.Function `json:"unit"`
	Processed           bool          `json:"processed"`
	Partial             bool          `json:"partial"`
	CreatedAt           time.Time     `json:"createdAt"`
	UpdatedAt           time.Time     `json:"updatedAt"`
}

type Function

type Function struct {
	Id                  uuid.UUID        `json:"id,omitempty"`
	ContractAddress     string           `json:"contractAddress,omitempty"`
	Name                string           `json:"name"`
	Signature           string           `json:"signature"`
	SignatureDefinition string           `json:"signatureDefinition"`
	Abi                 string           `json:"abi"`
	Implemented         bool             `json:"implemented"`
	Visibility          string           `json:"visibility"`
	Mutability          string           `json:"mutability"`
	Virtual             bool             `json:"virtual"`
	Parameters          []*ast.Parameter `json:"parameters"`
	ReturnParameters    []*ast.Parameter `json:"returnParameters"`
	CreatedAt           time.Time        `json:"createdAt"`
	UpdatedAt           time.Time        `json:"updatedAt"`
}

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.EventDefinition   `json:"ast"`
}

type Metadata

type Metadata struct {
	Id              uuid.UUID      `json:"id"`
	NetworkId       *big.Int       `json:"networkId"`
	ContractId      uuid.UUID      `json:"contractId"`
	ContractAddress common.Address `json:"contractAddress"`
	CborLength      int16          `json:"cborLength"`
	AuxBytes        string         `json:"auxBytes"`
	Ipfs            string         `json:"ipfs"`
	Bzzr0           string         `json:"bzzr0"`
	Bzzr1           string         `json:"bzzr1"`
	SolcVersion     string         `json:"solcVersion"`
	Processed       bool           `json:"processed"`
	Partial         bool           `json:"partial"`
	CreatedAt       time.Time      `json:"createdAt"`
	UpdatedAt       time.Time      `json:"updatedAt"`
}

type Network

type Network struct {
	Id            int    `json:"id"`
	Name          string `json:"name"`
	CanonicalName string `json:"canonicalName"`
	Symbol        string `json:"symbol"`
	Website       string `json:"website"`
	Suspended     bool   `json:"suspended"`
	Maintenance   bool   `json:"maintenance"`
}

type Opcode

type Opcode struct {
	Abi          string     `json:"abi"`
	Instructions []string   `json:"instructions"`
	Functions    []Function `json:"functions"`
	Events       []Event    `json:"events"`
}

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 Standard

type Standard struct {
	Id               uuid.UUID                  `json:"id"`
	NetworkId        *big.Int                   `json:"networkId"`
	ContractAddress  common.Address             `json:"contractAddress"`
	Name             string                     `json:"name"`
	Type             standards.Standard         `json:"type"`
	Confidence       string                     `json:"confidence"`
	ConfidencePoints float64                    `json:"confidencePoints"`
	DiscoveredTokens int64                      `json:"discoveredTokens"`
	MaximumTokens    int64                      `json:"maximumTokens"`
	Threshold        float64                    `json:"threshold"`
	Unit             standards.ContractStandard `json:"unit"`
	Processed        bool                       `json:"processed"`
	Partial          bool                       `json:"partial"`
	CreatedAt        time.Time                  `json:"createdAt"`
	UpdatedAt        time.Time                  `json:"updatedAt"`
}

type StatsResponse

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

type Token

type Token struct {
	NetworkId       utils.NetworkID `json:"networkId"`
	ContractAddress common.Address  `json:"contractAddress"`
	Name            string          `json:"name"`
	Symbol          string          `json:"symbol"`
	Decimals        int64           `json:"decimals"`
	TotalSupply     string          `json:"totalSupply"`
	Valid           bool            `json:"valid"`
	CompletedStates []string        `json:"completedStates"`
	FailedStates    []string        `json:"failedStates"`
	Processed       bool            `json:"processed"`
	Partial         bool            `json:"partial"`
}

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
}

type Variable

type Variable struct {
	Id              uuid.UUID                     `json:"id"`
	NetworkId       utils.NetworkID               `json:"networkId"`
	ContractAddress common.Address                `json:"contractAddress"`
	Name            string                        `json:"name"`
	Type            string                        `json:"type"`
	StateMutability string                        `json:"stateMutability"`
	Visibility      string                        `json:"visibility"`
	IsConstant      bool                          `json:"isConstant"`
	IsAddress       bool                          `json:"isAddress"`
	IsContract      bool                          `json:"isContract"`
	IsArray         bool                          `json:"isArray"`
	IsDynamicArray  bool                          `json:"isDynamicArray"`
	IsMapping       bool                          `json:"isMapping"`
	IsStruct        bool                          `json:"isStruct"`
	StorageIndex    int64                         `json:"storageIndex"`
	StorageSize     int64                         `json:"storageSize"`
	StorageOffset   int64                         `json:"storageOffset"`
	Unit            *ast.StateVariableDeclaration `json:"unit"`
	Processed       bool                          `json:"processed"`
	Partial         bool                          `json:"partial"`
	CreatedAt       time.Time                     `json:"createdAt"`
	UpdatedAt       time.Time                     `json:"updatedAt"`
}

Jump to

Keyboard shortcuts

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