rpctypes

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 13 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" doc:"Raw ABI"`            // Raw ABI is the raw JSON representation of the ABI.
	AbiMethods []abi.Method      `json:"abiMethods" doc:"ABI methods"` // ABI methods are the methods defined in the ABI.
	Functions  []PartialFunction `json:"functions" doc:"Functions"`    // Functions are the parsed function definitions from the ABI.
	Events     []PartialEvent    `json:"events" doc:"Events"`          // Events are the parsed event definitions from the ABI.
}

Abi represents the ABI (Application Binary Interface) details of a smart contract.

type Account

type Account struct {
	Id                             uuid.UUID       `json:"id" doc:"Account ID"`                                                   // Unique identifier for the account.
	NetworkId                      utils.NetworkID `json:"networkId" doc:"Network ID"`                                            // Network ID specifies the blockchain network.
	Address                        common.Address  `json:"address" doc:"Account address"`                                         // Address specifies the blockchain account address.
	CreationBlock                  *big.Int        `json:"creationBlock" doc:"Creation block"`                                    // Creation block is the block number where the account was created.
	CreationTxHash                 common.Hash     `json:"creationTxHash" doc:"Creation transaction hash"`                        // Creation transaction hash is the hash of the transaction that created the account.
	Name                           string          `json:"name" doc:"Account name"`                                               // Name is the name associated with the account.
	Ens                            string          `json:"ens" doc:"ENS name"`                                                    // ENS name is the Ethereum Name Service name associated with the account.
	Tags                           []string        `json:"tags" doc:"Tags"`                                                       // Tags are user-defined labels associated with the account.
	Type                           string          `json:"type" doc:"Account type"`                                               // Type specifies the type of account (e.g., contract, wallet).
	Balance                        string          `json:"balance" doc:"Balance"`                                                 // Balance is the current balance of the account.
	Blacklisted                    bool            `json:"blacklisted" doc:"Blacklisted status"`                                  // Blacklisted status indicates if the account is blacklisted.
	BlacklistReasons               []string        `json:"blacklistReasons" doc:"Blacklist reasons"`                              // Blacklist reasons are the reasons for blacklisting the account.
	BlacklistContractReferences    []string        `json:"blacklistContractReferences" doc:"Blacklist contract references"`       // References to contracts related to blacklisting.
	BlacklistAccountReferences     []string        `json:"blacklistAccountReferences" doc:"Blacklist account references"`         // References to accounts related to blacklisting.
	BlacklistTransactionReferences []string        `json:"blacklistTransactionReferences" doc:"Blacklist transaction references"` // References to transactions related to blacklisting.
	CompletedStates                []string        `json:"completedStates" doc:"Completed states"`                                // Completed states are the states that have been completed for the account.
	FailedStates                   []string        `json:"failedStates" doc:"Failed states"`                                      // Failed states are the states that have failed for the account.
	Processed                      bool            `json:"processed" doc:"Processed status"`                                      // Processed status indicates if the account has been processed.
	Partial                        bool            `json:"partial" doc:"Partial status"`                                          // Partial status indicates if the account processing is partial.
	CreatedAt                      time.Time       `json:"createdAt" doc:"Created at"`                                            // Timestamp of when the account was created.
	UpdatedAt                      time.Time       `json:"updatedAt" doc:"Updated at"`                                            // Timestamp of when the account was last updated.
}

Account represents the details of a blockchain account.

type Ast

type Ast struct {
	NetworkId       *big.Int       `json:"networkId" doc:"Network ID" huma:"path"`             // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet).
	ContractId      uuid.UUID      `json:"contractId" doc:"Contract ID" huma:"path"`           // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address `json:"contractAddress" doc:"Contract address" huma:"path"` // Contract address specifies the smart contract address.
	Ast             *ast.RootNode  `json:"ast" doc:"AST Root Node"`                            // AST Root Node is the root of the abstract syntax tree.
}

Ast represents the Abstract Syntax Tree (AST) for a smart contract.

type AstConstants

type AstConstants struct {
	NetworkId       *big.Int                        `json:"networkId" doc:"Network ID"`               // Network ID specifies the blockchain network.
	ContractId      uuid.UUID                       `json:"contractId" doc:"Contract ID"`             // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address                  `json:"contractAddress" doc:"Contract address"`   // Contract address specifies the smart contract address.
	Total           int                             `json:"total" doc:"Total count"`                  // Total number of constants.
	Constants       []*ast.StateVariableDeclaration `json:"constants" doc:"Constant state variables"` // Constant state variables in the AST.
}

AstConstants represents the constant state variables in the AST of a smart contract.

type AstConstructors

type AstConstructors struct {
	NetworkId        *big.Int           `json:"networkId" doc:"Network ID"`                 // Network ID specifies the blockchain network.
	ContractId       uuid.UUID          `json:"contractId" doc:"Contract ID"`               // Contract ID is the unique identifier for the contract.
	ContractAddress  common.Address     `json:"contractAddress" doc:"Contract address"`     // Contract address specifies the smart contract address.
	Total            int                `json:"total" doc:"Total count"`                    // Total number of constructors.
	EntryConstructor *ast.Constructor   `json:"entryConstructor" doc:"Entry constructor"`   // Entry constructor in the AST.
	Constructors     []*ast.Constructor `json:"constructors" doc:"Constructor definitions"` // Constructor definitions in the AST.
}

AstConstructors represents the constructor definitions in the AST of a smart contract.

type AstContracts

type AstContracts struct {
	NetworkId       *big.Int                                      `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractId      uuid.UUID                                     `json:"contractId" doc:"Contract ID"`           // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address                                `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Contracts       []*ast.SourceUnit[ast.Node[astpb.SourceUnit]] `json:"contracts" doc:"Contract definitions"`   // Contract definitions in the AST.
}

AstContracts represents the contract definitions in the AST of a smart contract.

type AstDocs

type AstDocs struct {
	NetworkId       *big.Int       `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractId      uuid.UUID      `json:"contractId" doc:"Contract ID"`           // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Docs            []*ast.Comment `json:"docs" doc:"Documentation comments"`      // Documentation comments in the AST.
}

AstDocs represents the documentation comments in the AST of a smart contract.

type AstEnums

type AstEnums struct {
	NetworkId       *big.Int              `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractId      uuid.UUID             `json:"contractId" doc:"Contract ID"`           // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address        `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Total           int                   `json:"total" doc:"Total count"`                // Total number of enums.
	Enums           []*ast.EnumDefinition `json:"enums" doc:"Enum definitions"`           // Enum definitions in the AST.
}

AstEnums represents the enum definitions in the AST of a smart contract.

type AstErrors

type AstErrors struct {
	NetworkId       *big.Int               `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractId      uuid.UUID              `json:"contractId" doc:"Contract ID"`           // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address         `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Total           int                    `json:"total" doc:"Total count"`                // Total number of errors.
	Errors          []*ast.ErrorDefinition `json:"errors" doc:"Error definitions"`         // Error definitions in the AST.
}

AstErrors represents the error definitions in the AST of a smart contract.

type AstEvents

type AstEvents struct {
	NetworkId       *big.Int               `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractId      uuid.UUID              `json:"contractId" doc:"Contract ID"`           // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address         `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Total           int                    `json:"total" doc:"Total count"`                // Total number of events.
	Events          []*ast.EventDefinition `json:"events" doc:"Event definitions"`         // Event definitions in the AST.
}

AstEvents represents the event definitions in the AST of a smart contract.

type AstFunctions

type AstFunctions struct {
	NetworkId       *big.Int        `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractId      uuid.UUID       `json:"contractId" doc:"Contract ID"`           // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address  `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Total           int             `json:"total" doc:"Total count"`                // Total number of functions.
	Functions       []*ast.Function `json:"functions" doc:"Function definitions"`   // Function definitions in the AST.
}

AstFunctions represents the function definitions in the AST of a smart contract.

type AstImports

type AstImports struct {
	NetworkId       *big.Int       `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractId      uuid.UUID      `json:"contractId" doc:"Contract ID"`           // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Imports         []*ast.Import  `json:"imports" doc:"Import statements"`        // Import statements in the AST.
}

AstImports represents the import statements in the AST of a smart contract.

type AstInterfaces

type AstInterfaces struct {
	NetworkId       *big.Int                                      `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractId      uuid.UUID                                     `json:"contractId" doc:"Contract ID"`           // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address                                `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Interfaces      []*ast.SourceUnit[ast.Node[astpb.SourceUnit]] `json:"interfaces" doc:"Interface definitions"` // Interface definitions in the AST.
}

AstInterfaces represents the interface definitions in the AST of a smart contract.

type AstLibraries

type AstLibraries struct {
	NetworkId       *big.Int                                      `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractId      uuid.UUID                                     `json:"contractId" doc:"Contract ID"`           // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address                                `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Libraries       []*ast.SourceUnit[ast.Node[astpb.SourceUnit]] `json:"libraries" doc:"Library definitions"`    // Library definitions in the AST.
}

AstLibraries represents the library definitions in the AST of a smart contract.

type AstLicense

type AstLicense struct {
	License string `json:"license" doc:"License"` // License information of the smart contract.
}

AstLicense represents the license information of a smart contract.

type AstStat

type AstStat struct {
	Id                  uuid.UUID      `json:"id" doc:"ID"`                                     // Unique identifier for the AST statistics.
	NetworkId           *big.Int       `json:"networkId" doc:"Network ID"`                      // Network ID specifies the blockchain network.
	ContractId          uuid.UUID      `json:"contractId" doc:"Contract ID"`                    // Contract ID is the unique identifier for the contract.
	ContractAddress     common.Address `json:"contractAddress" doc:"Contract address"`          // Contract address specifies the smart contract address.
	UnitsCount          int64          `json:"unitsCount" doc:"Units count"`                    // Number of source units.
	ContractsCount      int64          `json:"contractsCount" doc:"Contracts count"`            // Number of contracts.
	InterfacesCount     int64          `json:"interfacesCount" doc:"Interfaces count"`          // Number of interfaces.
	LibrariesCount      int64          `json:"librariesCount" doc:"Libraries count"`            // Number of libraries.
	StateVariablesCount int64          `json:"stateVariablesCount" doc:"State variables count"` // Number of state variables.
	FunctionsCount      int64          `json:"functionsCount" doc:"Functions count"`            // Number of functions.
	EventsCount         int64          `json:"eventsCount" doc:"Events count"`                  // Number of events.
	Processed           bool           `json:"processed" doc:"Processed"`                       // Indicates if the AST has been processed.
	Partial             bool           `json:"partial" doc:"Partial"`                           // Indicates if the AST is partial.
	CreatedAt           time.Time      `json:"createdAt" doc:"Created at"`                      // Timestamp of when the AST statistics were created.
	UpdatedAt           time.Time      `json:"updatedAt" doc:"Updated at"`                      // Timestamp of when the AST statistics were last updated.
}

AstStat represents statistics about the AST of a smart contract.

type AstStateVariables

type AstStateVariables struct {
	NetworkId       *big.Int                        `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractId      uuid.UUID                       `json:"contractId" doc:"Contract ID"`           // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address                  `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Total           int                             `json:"total" doc:"Total count"`                // Total number of state variables.
	Variables       []*ast.StateVariableDeclaration `json:"variables" doc:"State variables"`        // State variables in the AST.
}

AstStateVariables represents the state variables in the AST of a smart contract.

type AstStructs

type AstStructs struct {
	NetworkId       *big.Int                `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractId      uuid.UUID               `json:"contractId" doc:"Contract ID"`           // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address          `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Total           int                     `json:"total" doc:"Total count"`                // Total number of structs.
	Structs         []*ast.StructDefinition `json:"structs" doc:"Struct definitions"`       // Struct definitions in the AST.
}

AstStructs represents the struct definitions in the AST of a smart contract.

type Cfg

type Cfg struct {
	Id              uuid.UUID      `json:"Id" doc:"Configuration ID"`              // Unique identifier for the configuration.
	NetworkId       *big.Int       `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractAddress common.Address `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Mermaid         string         `json:"mermaid" doc:"Mermaid diagram"`          // Mermaid diagram represents the mermaid.js diagram for the contract.
	Processed       bool           `json:"processed" doc:"Processed status"`       // Processed status indicates if the configuration has been processed.
	Partial         bool           `json:"partial" doc:"Partial status"`           // Partial status indicates if the configuration processing is partial.
	CreatedAt       time.Time      `json:"createdAt" doc:"Created at"`             // Timestamp of when the configuration was created.
	UpdatedAt       time.Time      `json:"updatedAt" doc:"Updated at"`             // Timestamp of when the configuration was last updated.
}

Cfg represents the configuration details of a smart contract.

type Contract

type Contract struct {
	Id                   uuid.UUID           `json:"id" doc:"Contract ID"`                             // Unique identifier for the contract.
	NetworkId            modeltypes.BigInt   `json:"networkId" doc:"Network ID"`                       // Network ID specifies the blockchain network.
	BlockNumber          modeltypes.BigInt   `json:"blockNumber" doc:"Block number"`                   // BlockNumber is the block number where the contract was created.
	BlockHash            modeltypes.Hash     `json:"blockHash" doc:"Block hash"`                       // BlockHash is the hash of the block where the contract was created.
	TransactionHash      modeltypes.Hash     `json:"transactionHash" doc:"Transaction hash"`           // TransactionHash is the hash of the transaction that created the contract.
	DeployerAddress      modeltypes.Address  `json:"deployerAddress" doc:"Deployer address"`           // DeployerAddress is the address of the contract deployer.
	Address              modeltypes.Address  `json:"address" doc:"Contract address"`                   // Address is the address of the smart contract.
	Name                 string              `json:"name" doc:"Contract name"`                         // Name is the name of the contract.
	Standards            []string            `json:"standards" doc:"Standards"`                        // Standards are the compliance standards the contract adheres to.
	Proxy                bool                `json:"proxy" doc:"Proxy status"`                         // Proxy indicates if the contract is a proxy.
	ProxyImplementations []string            `json:"proxyImplementations" doc:"Proxy implementations"` // ProxyImplementations are the implementations of the proxy contract.
	License              string              `json:"license" doc:"License"`                            // License specifies the license of the contract.
	CompilerVersion      string              `json:"compilerVersion" doc:"Compiler version"`           // CompilerVersion is the version of the Solidity compiler used.
	SolgoVersion         string              `json:"solgoVersion" doc:"Solgo version"`                 // SolgoVersion is the version of Solgo used.
	Optimized            bool                `json:"optimized" doc:"Optimization status"`              // Optimized indicates if the contract is optimized.
	OptimizationRuns     uint64              `json:"optimizationRuns" doc:"Optimization runs"`         // OptimizationRuns is the number of optimization runs.
	EVMVersion           string              `json:"evmVersion" doc:"EVM version"`                     // EVMVersion is the version of the Ethereum Virtual Machine.
	ABI                  string              `json:"abi" doc:"ABI"`                                    // ABI is the Application Binary Interface of the contract.
	SourceEntryPoint     string              `json:"entryPoint" doc:"Source entry point"`              // SourceEntryPoint is the entry point of the contract's source code.
	Sources              []*solgo.SourceUnit `json:"sources" doc:"Sources"`                            // Sources are the source units of the contract.
	Verified             bool                `json:"verified" doc:"Verification status"`               // Verified indicates if the contract is verified.
	SourcesProvider      string              `json:"sourcesProvider" doc:"Sources provider"`           // SourcesProvider is the provider of the contract's source code.
	VerificationProvider string              `json:"verificationProvider" doc:"Verification provider"` // VerificationProvider is the provider of the contract verification.
	ExecutionBytecode    string              `json:"executionBytecode" doc:"Execution bytecode"`       // ExecutionBytecode is the bytecode used for execution.
	Bytecode             string              `json:"bytecode" doc:"Bytecode"`                          // Bytecode is the raw bytecode of the contract.
	SafetyState          string              `json:"safetyState" doc:"Safety state"`                   // SafetyState indicates the safety state of the contract.
	SourceAvailable      bool                `json:"sourceAvailable" doc:"Source availability"`        // SourceAvailable indicates if the source code is available.
	SelfDestructed       bool                `json:"selfDestructed" doc:"Self-destruct status"`        // SelfDestructed indicates if the contract has self-destructed.
	CompletedStates      []string            `json:"completedStates" doc:"Completed states"`           // CompletedStates are the states that have been completed for the contract.
	FailedStates         []string            `json:"failedStates" doc:"Failed states"`                 // FailedStates are the states that have failed for the contract.
	Processed            bool                `json:"processed" doc:"Processed status"`                 // Processed indicates if the contract has been processed.
	Partial              bool                `json:"partial" doc:"Partial status"`                     // Partial indicates if the contract processing is partial.
	CreatedAt            time.Time           `json:"created_at" doc:"Created at"`                      // Timestamp of when the contract was created.
	UpdatedAt            time.Time           `json:"updated_at" doc:"Updated at"`                      // Timestamp of when the contract was last updated.
}

Contract represents the details of a smart contract.

type ContractConstructor added in v0.9.7

type ContractConstructor struct {
	Id              uuid.UUID           `json:"id" doc:"Constructor ID"`                      // Unique identifier for the constructor.
	NetworkId       utils.NetworkID     `json:"networkId" doc:"Network ID"`                   // Network ID specifies the blockchain network.
	ContractAddress common.Address      `json:"address" doc:"Contract address"`               // Contract address specifies the smart contract address.
	Signature       string              `json:"signature" doc:"Constructor signature"`        // Signature is the function signature of the constructor.
	Arguments       []bytecode.Argument `json:"arguments" doc:"Constructor arguments"`        // Arguments are the parsed arguments for the constructor.
	ArgumentsRaw    []interface{}       `json:"argumentsRaw" doc:"Raw constructor arguments"` // ArgumentsRaw are the raw arguments for the constructor.
	Abi             string              `json:"abi" doc:"ABI"`                                // ABI is the Application Binary Interface of the constructor.
	Unit            *ast.Constructor    `json:"unit" doc:"AST Constructor unit"`              // Unit is the Intermediate Representation (IR) of the constructor.
	Processed       bool                `json:"processed" doc:"Processed status"`             // Processed status indicates if the constructor has been processed.
	Partial         bool                `json:"partial" doc:"Partial status"`                 // Partial status indicates if the constructor processing is partial.
	CreatedAt       time.Time           `json:"createdAt" doc:"Created at"`                   // Timestamp of when the constructor was created.
	UpdatedAt       time.Time           `json:"updatedAt" doc:"Updated at"`                   // Timestamp of when the constructor was last updated.
}

ContractConstructor represents the details of a constructor in a smart contract.

type FullEvent

type FullEvent struct {
	Id                  uuid.UUID            `json:"id" doc:"Event ID"`                              // Unique identifier for the event.
	ContractAddress     string               `json:"contractAddress" doc:"Contract address"`         // Contract address specifies the smart contract address.
	Name                string               `json:"name" doc:"Event name"`                          // Name is the name of the event.
	Signature           string               `json:"signature" doc:"Event signature"`                // Signature is the function signature of the event.
	SignatureDefinition string               `json:"signatureDefinition" doc:"Signature definition"` // SignatureDefinition is the definition of the event signature.
	Abi                 string               `json:"abi" doc:"ABI"`                                  // ABI is the Application Binary Interface of the event.
	Anonymous           bool                 `json:"anonymous" doc:"Anonymous status"`               // Anonymous status indicates if the event is anonymous.
	Unit                *ast.EventDefinition `json:"unit" doc:"AST Event definition"`                // Unit is the AST definition of the event.
	Processed           bool                 `json:"processed" doc:"Processed status"`               // Processed status indicates if the event has been processed.
	Partial             bool                 `json:"partial" doc:"Partial status"`                   // Partial status indicates if the event processing is partial.
	CreatedAt           time.Time            `json:"createdAt" doc:"Created at"`                     // Timestamp of when the event was created.
	UpdatedAt           time.Time            `json:"updatedAt" doc:"Updated at"`                     // Timestamp of when the event was last updated.
}

FullEvent represents the detailed information of an event in a smart contract.

type FullFunction

type FullFunction struct {
	Id                  uuid.UUID     `json:"id" doc:"Function ID"`                           // Unique identifier for the function.
	ContractAddress     string        `json:"contractAddress" doc:"Contract address"`         // Contract address specifies the smart contract address.
	Name                string        `json:"name" doc:"Function name"`                       // Name is the name of the function.
	Signature           string        `json:"signature" doc:"Function signature"`             // Signature is the function signature.
	SignatureHex        string        `json:"signatureHex" doc:"Function signature hex"`      // SignatureHex is the hex representation of the function signature.
	SignatureDefinition string        `json:"signatureDefinition" doc:"Signature definition"` // SignatureDefinition is the definition of the function signature.
	Abi                 string        `json:"abi" doc:"ABI"`                                  // ABI is the Application Binary Interface of the function.
	Implemented         bool          `json:"implemented" doc:"Implementation status"`        // Implemented status indicates if the function is implemented.
	Visibility          string        `json:"visibility" doc:"Visibility"`                    // Visibility specifies the visibility of the function (e.g., public, private).
	Mutability          string        `json:"mutability" doc:"Mutability"`                    // Mutability specifies the mutability of the function (e.g., view, pure).
	Virtual             bool          `json:"virtual" doc:"Virtual status"`                   // Virtual status indicates if the function is virtual.
	Unit                *ast.Function `json:"unit" doc:"AST Function definition"`             // Unit is the AST definition of the function.
	Processed           bool          `json:"processed" doc:"Processed status"`               // Processed status indicates if the function has been processed.
	Partial             bool          `json:"partial" doc:"Partial status"`                   // Partial status indicates if the function processing is partial.
	CreatedAt           time.Time     `json:"createdAt" doc:"Created at"`                     // Timestamp of when the function was created.
	UpdatedAt           time.Time     `json:"updatedAt" doc:"Updated at"`                     // Timestamp of when the function was last updated.
}

FullFunction represents the detailed information of a function in a smart contract.

type Log

type Log struct {
	Address        *utils.NamedAddr       `json:"address" doc:"Log address"`              // Address is the address of the contract that generated the log.
	Topics         []common.Hash          `json:"topics" doc:"Log topics"`                // Topics are the indexed log topics.
	Removed        bool                   `json:"removed" doc:"Removed status"`           // Removed indicates if the log was removed (due to chain reorganization).
	Signature      common.Hash            `json:"signature" doc:"Log signature"`          // Signature is the hash of the log signature.
	EventSignature string                 `json:"eventSignature" doc:"Event signature"`   // EventSignature is the signature of the event.
	Name           string                 `json:"name" doc:"Log name"`                    // Name is the name of the log.
	Type           utils.LogEventType     `json:"type" doc:"Log event type"`              // Type is the type of log event.
	Abi            string                 `json:"abi" doc:"ABI"`                          // ABI is the Application Binary Interface of the log.
	DecodedTopics  []bytecode.Topic       `json:"decodedTopics" doc:"Decoded log topics"` // DecodedTopics are the decoded log topics.
	RawData        string                 `json:"rawData" doc:"Raw log data"`             // RawData is the raw data of the log.
	Data           map[string]interface{} `json:"data" doc:"Decoded log data"`            // Data is the decoded data of the log.
	Anonymous      bool                   `json:"anonymous" doc:"Anonymous status"`       // Anonymous indicates if the log is anonymous.
	AST            *ast.EventDefinition   `json:"ast" doc:"AST event definition"`         // AST is the AST definition of the event.
}

Log represents a log entry from a transaction receipt.

type Metadata

type Metadata struct {
	Id              uuid.UUID      `json:"id" doc:"Metadata ID"`                        // Unique identifier for the metadata.
	NetworkId       *big.Int       `json:"networkId" doc:"Network ID"`                  // Network ID specifies the blockchain network.
	ContractId      uuid.UUID      `json:"contractId" doc:"Contract ID"`                // Contract ID is the unique identifier for the contract.
	ContractAddress common.Address `json:"contractAddress" doc:"Contract address"`      // Contract address specifies the smart contract address.
	CborLength      int16          `json:"cborLength" doc:"CBOR length"`                // CBOR length is the length of the CBOR-encoded metadata.
	AuxBytes        string         `json:"auxBytes" doc:"Auxiliary bytes"`              // Auxiliary bytes are additional bytes in the metadata.
	Ipfs            string         `json:"ipfs" doc:"IPFS hash"`                        // IPFS hash is the InterPlanetary File System hash for the metadata.
	Bzzr0           string         `json:"bzzr0" doc:"BZZR0 hash"`                      // BZZR0 hash is the Swarm hash for the metadata (version 0).
	Bzzr1           string         `json:"bzzr1" doc:"BZZR1 hash"`                      // BZZR1 hash is the Swarm hash for the metadata (version 1).
	SolcVersion     string         `json:"solcVersion" doc:"Solidity compiler version"` // SolcVersion is the version of the Solidity compiler used.
	Processed       bool           `json:"processed" doc:"Processed status"`            // Processed status indicates if the metadata has been processed.
	Partial         bool           `json:"partial" doc:"Partial status"`                // Partial status indicates if the metadata processing is partial.
	CreatedAt       time.Time      `json:"createdAt" doc:"Created at"`                  // Timestamp of when the metadata was created.
	UpdatedAt       time.Time      `json:"updatedAt" doc:"Updated at"`                  // Timestamp of when the metadata was last updated.
}

Metadata represents the metadata details of a smart contract.

type Network

type Network struct {
	Id            int    `json:"id" doc:"Network ID" huma:"path"`      // Network ID specifies the unique identifier for the network.
	Name          string `json:"name" doc:"Network name"`              // Network name specifies the name of the network.
	CanonicalName string `json:"canonicalName" doc:"Canonical name"`   // Canonical name specifies the canonical name of the network.
	Symbol        string `json:"symbol" doc:"Symbol"`                  // Symbol specifies the symbol of the network.
	Website       string `json:"website" doc:"Website"`                // Website specifies the website URL of the network.
	Suspended     bool   `json:"suspended" doc:"Suspended status"`     // Suspended status indicates if the network is suspended.
	Maintenance   bool   `json:"maintenance" doc:"Maintenance status"` // Maintenance status indicates if the network is under maintenance.
}

Network represents the details of a blockchain network.

type Opcode

type Opcode struct {
	Abi          string            `json:"abi" doc:"ABI"`                          // ABI is the Application Binary Interface of the smart contract.
	Instructions []string          `json:"instructions" doc:"Opcode instructions"` // Instructions are the list of opcode instructions.
	Functions    []PartialFunction `json:"functions" doc:"Functions"`              // Functions are the parsed function definitions from the opcode.
	Events       []PartialEvent    `json:"events" doc:"Events"`                    // Events are the parsed event definitions from the opcode.
}

Opcode represents the opcode details of a smart contract.

type PartialEvent added in v0.9.7

type PartialEvent struct {
	Id                  uuid.UUID            `json:"id" doc:"Event ID"`                              // Unique identifier for the event.
	ContractAddress     string               `json:"contractAddress" doc:"Contract address"`         // Contract address specifies the smart contract address.
	Name                string               `json:"name" doc:"Event name"`                          // Name is the name of the event.
	Signature           string               `json:"signature" doc:"Event signature"`                // Signature is the function signature of the event.
	SignatureHex        string               `json:"signatureHex" doc:"Event signature hex"`         // SignatureHex is the hex representation of the event signature.
	SignatureDefinition string               `json:"signatureDefinition" doc:"Signature definition"` // SignatureDefinition is the definition of the event signature.
	Abi                 string               `json:"abi" doc:"ABI"`                                  // ABI is the Application Binary Interface of the event.
	Anonymous           bool                 `json:"anonymous" doc:"Anonymous status"`               // Anonymous status indicates if the event is anonymous.
	Unit                *ast.EventDefinition `json:"unit" doc:"AST Event definition"`                // Unit is the AST definition of the event.
	CreatedAt           time.Time            `json:"createdAt" doc:"Created at"`                     // Timestamp of when the event was created.
	UpdatedAt           time.Time            `json:"updatedAt" doc:"Updated at"`                     // Timestamp of when the event was last updated.
}

PartialEvent represents the basic information of an event in a smart contract.

type PartialFunction added in v0.9.7

type PartialFunction struct {
	Id                  uuid.UUID        `json:"id,omitempty" doc:"Function ID"`                   // Unique identifier for the function.
	ContractAddress     string           `json:"contractAddress,omitempty" doc:"Contract address"` // Contract address specifies the smart contract address.
	Name                string           `json:"name" doc:"Function name"`                         // Name is the name of the function.
	Signature           string           `json:"signature" doc:"Function signature"`               // Signature is the function signature.
	SignatureDefinition string           `json:"signatureDefinition" doc:"Signature definition"`   // SignatureDefinition is the definition of the function signature.
	Abi                 string           `json:"abi" doc:"ABI"`                                    // ABI is the Application Binary Interface of the function.
	Implemented         bool             `json:"implemented" doc:"Implementation status"`          // Implemented status indicates if the function is implemented.
	Visibility          string           `json:"visibility" doc:"Visibility"`                      // Visibility specifies the visibility of the function (e.g., public, private).
	Mutability          string           `json:"mutability" doc:"Mutability"`                      // Mutability specifies the mutability of the function (e.g., view, pure).
	Virtual             bool             `json:"virtual" doc:"Virtual status"`                     // Virtual status indicates if the function is virtual.
	Parameters          []*ast.Parameter `json:"parameters" doc:"Function parameters"`             // Parameters are the input parameters of the function.
	ReturnParameters    []*ast.Parameter `json:"returnParameters" doc:"Return parameters"`         // ReturnParameters are the output parameters of the function.
	CreatedAt           time.Time        `json:"createdAt" doc:"Created at"`                       // Timestamp of when the function was created.
	UpdatedAt           time.Time        `json:"updatedAt" doc:"Updated at"`                       // Timestamp of when the function was last updated.
}

PartialFunction represents the basic information of a function in a smart contract.

type Receipt

type Receipt struct {
	BlockNumber       *big.Int       `json:"blockNumber" doc:"Block number"`              // BlockNumber is the number of the block containing the transaction.
	BlockHash         common.Hash    `json:"blockHash" doc:"Block hash"`                  // BlockHash is the hash of the block containing the transaction.
	ContractAddress   common.Address `json:"contractAddress" doc:"Contract address"`      // ContractAddress is the address of the contract created by the transaction.
	TransactionIndex  uint           `json:"transactionIndex" doc:"Transaction index"`    // TransactionIndex is the index of the transaction within the block.
	GasUsed           uint64         `json:"gasUsed" doc:"Gas used"`                      // GasUsed is the amount of gas used by the transaction.
	CumulativeGasUsed uint64         `json:"cumulativeGasUsed" doc:"Cumulative gas used"` // CumulativeGasUsed is the total amount of gas used when this transaction was included in the block.
	EffectiveGasPrice *big.Int       `json:"effectiveGasPrice" doc:"Effective gas price"` // EffectiveGasPrice is the effective gas price for the transaction.
	BlobGasUsed       uint64         `json:"blobGasUsed" doc:"Blob gas used"`             // BlobGasUsed is the amount of blob gas used by the transaction.
	BlobGasPrice      *big.Int       `json:"blobGasPrice" doc:"Blob gas price"`           // BlobGasPrice is the price of the blob gas used by the transaction.
	Status            uint64         `json:"status" doc:"Transaction status"`             // Status indicates the status of the transaction (1 for success, 0 for failure).
	Bloom             types.Bloom    `json:"bloom" doc:"Bloom filter"`                    // Bloom filter for the logs of the transaction.
	PostState         string         `json:"postState" doc:"Post state"`                  // PostState is the state after the transaction.
}

Receipt represents the receipt of a blockchain transaction.

type Standard

type Standard struct {
	Id               uuid.UUID                  `json:"id" doc:"Standard ID"`                     // Unique identifier for the standard.
	NetworkId        *big.Int                   `json:"networkId" doc:"Network ID"`               // Network ID specifies the blockchain network.
	ContractAddress  common.Address             `json:"contractAddress" doc:"Contract address"`   // Contract address specifies the smart contract address.
	Name             string                     `json:"name" doc:"Standard name"`                 // Name is the name of the standard.
	Type             standards.Standard         `json:"type" doc:"Standard type"`                 // Type specifies the type of standard (e.g., ERC-20, ERC-721).
	Confidence       string                     `json:"confidence" doc:"Confidence level"`        // Confidence level indicates the confidence in the standard compliance.
	ConfidencePoints float64                    `json:"confidencePoints" doc:"Confidence points"` // Confidence points represent the confidence score.
	DiscoveredTokens int64                      `json:"discoveredTokens" doc:"Discovered tokens"` // Discovered tokens are the number of tokens discovered.
	MaximumTokens    int64                      `json:"maximumTokens" doc:"Maximum tokens"`       // Maximum tokens is the maximum number of tokens defined by the standard.
	Threshold        float64                    `json:"threshold" doc:"Threshold"`                // Threshold is the threshold for compliance.
	Unit             standards.ContractStandard `json:"unit" doc:"Standard unit"`                 // Unit is the contract standard unit.
	Processed        bool                       `json:"processed" doc:"Processed status"`         // Processed status indicates if the standard has been processed.
	Partial          bool                       `json:"partial" doc:"Partial status"`             // Partial status indicates if the standard processing is partial.
	CreatedAt        time.Time                  `json:"createdAt" doc:"Created at"`               // Timestamp of when the standard was created.
	UpdatedAt        time.Time                  `json:"updatedAt" doc:"Updated at"`               // Timestamp of when the standard was last updated.
}

Standard represents the details of a compliance standard for a smart contract.

type StatsResponse

type StatsResponse struct {
	ContractsCount uint64 `json:"contractsCount" doc:"Contracts count"` // ContractsCount is the total number of contracts.
}

StatsResponse represents the response containing statistics about contracts.

type Token

type Token struct {
	NetworkId       utils.NetworkID `json:"networkId" doc:"Network ID"`             // Network ID specifies the blockchain network.
	ContractAddress common.Address  `json:"contractAddress" doc:"Contract address"` // Contract address specifies the smart contract address.
	Name            string          `json:"name" doc:"Token name"`                  // Name is the name of the token.
	Symbol          string          `json:"symbol" doc:"Token symbol"`              // Symbol is the symbol of the token.
	Decimals        int64           `json:"decimals" doc:"Token decimals"`          // Decimals is the number of decimal places the token uses.
	TotalSupply     string          `json:"totalSupply" doc:"Total supply"`         // TotalSupply is the total supply of the token.
	Valid           bool            `json:"valid" doc:"Validity status"`            // Validity status indicates if the token is valid.
	CompletedStates []string        `json:"completedStates" doc:"Completed states"` // Completed states are the states that have been completed for the token.
	FailedStates    []string        `json:"failedStates" doc:"Failed states"`       // Failed states are the states that have failed for the token.
	Processed       bool            `json:"processed" doc:"Processed status"`       // Processed status indicates if the token has been processed.
	Partial         bool            `json:"partial" doc:"Partial status"`           // Partial status indicates if the token processing is partial.
	CreatedAt       time.Time       `json:"createdAt" doc:"Created at (UTC)"`
	UpdatedAt       time.Time       `json:"updatedAt" doc:"Last updated time (UTC)"`
}

Token represents the details of a token in a blockchain network.

type Transaction

type Transaction struct {
	Hash              common.Hash                 `json:"hash" doc:"Transaction hash"`                  // Hash is the hash of the transaction.
	Type              uint8                       `json:"type" doc:"Transaction type"`                  // Type is the type of the transaction.
	Sender            *utils.NamedAddr            `json:"sender" doc:"Sender address"`                  // Sender is the address of the transaction sender.
	Recipient         *utils.NamedAddr            `json:"recipient" doc:"Recipient address"`            // Recipient is the address of the transaction recipient.
	AccessList        types.AccessList            `json:"accessList" doc:"Access list"`                 // AccessList is the access list of the transaction.
	Nonce             uint64                      `json:"nonce" doc:"Transaction nonce"`                // Nonce is the nonce of the transaction.
	Protected         bool                        `json:"protected" doc:"Protected status"`             // Protected indicates if the transaction is protected (EIP-1559).
	IsPending         bool                        `json:"isPending" doc:"Pending status"`               // IsPending indicates if the transaction is pending.
	Value             *big.Int                    `json:"value" doc:"Transaction value"`                // Value is the value transferred in the transaction.
	Cost              *big.Int                    `json:"cost" doc:"Transaction cost"`                  // Cost is the total cost of the transaction.
	Gas               uint64                      `json:"gas" doc:"Gas limit"`                          // Gas is the gas limit of the transaction.
	GasPrice          *big.Int                    `json:"gasPrice" doc:"Gas price"`                     // GasPrice is the gas price of the transaction.
	GasFeeCap         *big.Int                    `json:"gasFeeCap" doc:"Gas fee cap"`                  // GasFeeCap is the gas fee cap of the transaction (EIP-1559).
	GasTipCap         *big.Int                    `json:"gasTipCap" doc:"Gas tip cap"`                  // GasTipCap is the gas tip cap of the transaction (EIP-1559).
	BlobGas           uint64                      `json:"blobGas" doc:"Blob gas"`                       // BlobGas is the blob gas limit of the transaction.
	BlobGasFeeCap     *big.Int                    `json:"blobGasFeeCap" doc:"Blob gas fee cap"`         // BlobGasFeeCap is the blob gas fee cap of the transaction.
	BlobHashes        []common.Hash               `json:"blobHashes" doc:"Blob hashes"`                 // BlobHashes are the blob hashes associated with the transaction.
	BlobTxSidecar     *types.BlobTxSidecar        `json:"blobTxSidecar" doc:"Blob transaction sidecar"` // BlobTxSidecar is the blob transaction sidecar.
	RawSignature      *TransactionRawSignature    `json:"rawSignature" doc:"Raw signature"`             // RawSignature is the raw signature of the transaction.
	Signature         string                      `json:"signature" doc:"Transaction signature"`        // Signature is the signature of the transaction.
	FunctionName      string                      `json:"functionName" doc:"Function name"`             // FunctionName is the name of the called function.
	FunctionSignature string                      `json:"functionSignature" doc:"Function signature"`   // FunctionSignature is the signature of the called function.
	Implemented       bool                        `json:"implemented" doc:"Implementation status"`      // Implemented indicates if the function is implemented.
	StateMutability   string                      `json:"stateMutability" doc:"State mutability"`       // StateMutability indicates the state mutability of the function.
	Visibility        string                      `json:"visibility" doc:"Function visibility"`         // Visibility indicates the visibility of the function.
	Virtual           bool                        `json:"virtual" doc:"Virtual status"`                 // Virtual indicates if the function is virtual.
	MethodType        utils.TransactionMethodType `json:"methodType" doc:"Method type"`                 // MethodType indicates the type of the transaction method.
	MethodPayload     map[string]interface{}      `json:"methodPayload" doc:"Method payload"`           // MethodPayload is the payload of the transaction method.
	MethodAbi         string                      `json:"methodAbi" doc:"Method ABI"`                   // MethodAbi is the ABI of the transaction method.
	Data              string                      `json:"data" doc:"Transaction data"`                  // Data is the input data of the transaction.
	Time              time.Time                   `json:"time" doc:"Transaction time"`                  // Time is the timestamp of the transaction.
	Receipt           *Receipt                    `json:"receipt" doc:"Transaction receipt"`            // Receipt is the receipt of the transaction.
	Logs              []Log                       `json:"logs" doc:"Transaction logs"`                  // Logs are the logs generated by the transaction.
	AST               *ast.Function               `json:"ast" doc:"AST function definition"`            // AST is the AST definition of the called function.
}

Transaction represents a blockchain transaction.

type TransactionRawSignature

type TransactionRawSignature struct {
	V, R, S *big.Int `json:"v,r,s" doc:"Raw signature components"` // V, R, S are the raw signature components of the transaction.
}

TransactionRawSignature represents the raw signature components of a transaction.

type Variable

type Variable struct {
	Id              uuid.UUID                     `json:"id" doc:"Variable ID"`                      // Unique identifier for the variable.
	NetworkId       utils.NetworkID               `json:"networkId" doc:"Network ID"`                // Network ID specifies the blockchain network.
	ContractAddress common.Address                `json:"contractAddress" doc:"Contract address"`    // Contract address specifies the smart contract address.
	Name            string                        `json:"name" doc:"Variable name"`                  // Name is the name of the variable.
	Type            string                        `json:"type" doc:"Variable type"`                  // Type is the type of the variable.
	StateMutability string                        `json:"stateMutability" doc:"State mutability"`    // StateMutability specifies the mutability of the variable.
	Visibility      string                        `json:"visibility" doc:"Variable visibility"`      // Visibility specifies the visibility of the variable.
	IsConstant      bool                          `json:"isConstant" doc:"Constant status"`          // IsConstant indicates if the variable is constant.
	IsAddress       bool                          `json:"isAddress" doc:"Address status"`            // IsAddress indicates if the variable is an address.
	IsContract      bool                          `json:"isContract" doc:"Contract status"`          // IsContract indicates if the variable is a contract.
	IsArray         bool                          `json:"isArray" doc:"Array status"`                // IsArray indicates if the variable is an array.
	IsDynamicArray  bool                          `json:"isDynamicArray" doc:"Dynamic array status"` // IsDynamicArray indicates if the variable is a dynamic array.
	IsMapping       bool                          `json:"isMapping" doc:"Mapping status"`            // IsMapping indicates if the variable is a mapping.
	IsStruct        bool                          `json:"isStruct" doc:"Struct status"`              // IsStruct indicates if the variable is a struct.
	StorageIndex    int64                         `json:"storageIndex" doc:"Storage index"`          // StorageIndex is the index of the variable in storage.
	StorageSize     int64                         `json:"storageSize" doc:"Storage size"`            // StorageSize is the size of the variable in storage.
	StorageOffset   int64                         `json:"storageOffset" doc:"Storage offset"`        // StorageOffset is the offset of the variable in storage.
	Unit            *ast.StateVariableDeclaration `json:"unit" doc:"AST variable declaration"`       // Unit is the AST definition of the state variable.
	Processed       bool                          `json:"processed" doc:"Processed status"`          // Processed indicates if the variable has been processed.
	Partial         bool                          `json:"partial" doc:"Partial status"`              // Partial indicates if the variable processing is partial.
	CreatedAt       time.Time                     `json:"createdAt" doc:"Created at"`                // Timestamp of when the variable was created.
	UpdatedAt       time.Time                     `json:"updatedAt" doc:"Updated at"`                // Timestamp of when the variable was last updated.
}

Variable represents the details of a state variable in a smart contract.

Jump to

Keyboard shortcuts

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