Documentation ¶
Index ¶
- Constants
- func AcquireLock(ctx context.Context, redisCache *cache.Redis, key string, ttl time.Duration) (bool, error)
- func CheckIfLocked(ctx context.Context, redisCache *cache.Redis, key string) (bool, error)
- func DecodeCursor(encodedCursor string) (*big.Int, error)
- func DeleteApiKeys(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, ...) error
- func GetAccountKey(networkId string, address string) string
- func GetApiKey(id uuid.UUID, label string) string
- func GetAstKey(networkId string, address string) string
- func GetCfgKey(networkId string, address string) string
- func GetConstructorKey(networkId string, address string) string
- func GetContractEventReferencesByReferenceIDs(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]string, error)
- func GetContractFunctionReferencesByIDs(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]string, error)
- func GetEventKey(networkId string, address string, referenceId string) string
- func GetFunctionKey(networkId string, address string, referenceId string) string
- func GetMetadataKey(networkId string, address string) string
- func GetStandardKey(networkId string, address string, standard standards.Standard) string
- func GetTokenKey(networkId string, address string) string
- func GetVariableKey(networkId string, address string, name string) string
- func GetVariableNamesByContract(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]string, error)
- func ReleaseLock(ctx context.Context, redisCache *cache.Redis, key string) error
- func SaveAccounts(ctx context.Context, redisCache *cache.Redis, dbAdapter *db.Postgres, ...) error
- func SaveApiKeys(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, ...) error
- func SaveAst(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, ...) error
- func SaveCfg(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, ...) error
- func SaveConstructors(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, ...) error
- func SaveContract(ctx context.Context, dbAdapter *db.Postgres, contracts ...*Contract) error
- func SaveEvents(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, ...) error
- func SaveFunctions(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, ...) error
- func SaveMetadata(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, ...) error
- func SaveStandards(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, ...) error
- func SaveToken(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, ...) error
- func SaveVariables(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, ...) error
- type Account
- func GetAccountByNetworkId(ctx context.Context, db *db.Postgres, networkId *big.Int, ...) (*Account, error)
- func GetAccounts(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, ...) ([]*Account, error)
- func GetAccountsByTags(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, tags []string, ...) ([]*Account, error)
- type ApiKey
- func GetApiKeyByID(ctx context.Context, dbAdapter *db.Postgres, id uuid.UUID) (*ApiKey, error)
- func GetApiKeyByKey(ctx context.Context, dbAdapter *db.Postgres, key string) (*ApiKey, error)
- func GetApiKeyByProfileId(ctx context.Context, dbAdapter *db.Postgres, id string) (*ApiKey, error)
- func GetApiKeys(ctx context.Context, dbAdapter *db.Postgres, limit int) ([]ApiKey, error)
- type Ast
- type Cfg
- type Constructor
- func GetConstructorByContract(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) (*Constructor, error)
- func GetConstructors(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, ...) ([]*Constructor, error)
- func GetConstructorsByContract(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Constructor, error)
- type Contract
- func GetContractByAddress(ctx context.Context, db *db.Postgres, networkId *big.Int, ...) (*Contract, error)
- func GetContractByTransactionHash(ctx context.Context, db *db.Postgres, networkId *big.Int, hash common.Hash) (*Contract, error)
- func GetContracts(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, ...) ([]*Contract, error)
- func GetContractsByBlockNumber(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Contract, error)
- func GetContractsByDeployerAddress(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Contract, error)
- func GetContractsByStandards(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Contract, error)
- type DbStat
- type DbStats
- type Event
- func GetContractEventBySignature(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) (*Event, error)
- func GetEventBySignature(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) (*Event, error)
- func GetEvents(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, ...) ([]*Event, error)
- func GetEventsByContract(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Event, error)
- func GetEventsByContractAndName(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Event, error)
- func GetEventsBySignature(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Event, error)
- type Function
- func GetContractFunctionBySignature(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) (*Function, error)
- func GetFunctionBySignature(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) (*Function, error)
- func GetFunctions(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, ...) ([]*Function, error)
- func GetFunctionsByContract(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Function, error)
- func GetFunctionsByContractAndName(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Function, error)
- func GetFunctionsBySignature(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Function, error)
- type Metadata
- type Standard
- func GetStandardByContractAndType(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) (*Standard, error)
- func GetStandards(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, ...) ([]*Standard, error)
- func GetStandardsByConfidences(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Standard, error)
- func GetStandardsByContract(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Standard, error)
- func GetStandardsByContractAndConfidences(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Standard, error)
- func GetStandardsByContractAndTypes(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Standard, error)
- func GetStandardsByContractAndTypesAndConfidences(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Standard, error)
- func GetStandardsByTypes(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Standard, error)
- func GetStandardsByTypesAndConfidences(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Standard, error)
- type Token
- func GetTokenByContractAddress(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) (*Token, error)
- func GetTokens(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, ...) ([]*Token, error)
- func GetTokensBySymbol(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, symbol string, ...) ([]*Token, error)
- type Variable
- func GetVariables(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, ...) ([]*Variable, error)
- func GetVariablesByContract(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Variable, error)
- func GetVariablesByContractAndName(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Variable, error)
- func GetVariablesByContractAndStorageIndex(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, ...) ([]*Variable, error)
- func GetVariablesByName(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, name string, ...) ([]*Variable, error)
Constants ¶
const AccountKeyPrefix = "account:entry"
AccountKeyPrefix is a constant defining the prefix for the database keys of ethereum based address entries.
const ApiKeyPrefix = "acl:api_key:entry"
ApiKeyPrefix is a constant defining the prefix for the database keys of contract api key entries.
const AstKeyPrefix = "contract:ast:entry"
AstKeyPrefix is a constant defining the prefix for the database keys of contract metadata entries.
const CfgKeyPrefix = "contract:cfg:entry"
CfgKeyPrefix is a constant defining the prefix for the database keys of contract cfg entries.
const ConstructorKeyPrefix = "contract:constructor:entry"
ConstructorKeyPrefix is a constant defining the prefix for the database keys of contract constructor entries.
const ContractKeyPrefix = "contract:entry"
ContractKeyPrefix is a constant defining the prefix for the database keys of contract entries.
const EventKeyPrefix = "contract:event:entry"
EventKeyPrefix is a constant defining the prefix for the database keys of contract metadata entries.
const FunctionKeyPrefix = "contract:function:entry"
FunctionKeyPrefix is a constant defining the prefix for the database keys of contract metadata entries.
const MetadataKeyPrefix = "contract:metadata:entry"
MetadataKeyPrefix is a constant defining the prefix for the database keys of contract metadata entries.
const StandardKeyPrefix = "contract:standard:entry"
StandardKeyPrefix is a constant defining the prefix for the database keys of contract standard entries.
const TokenKeyPrefix = "contract:token:entry"
TokenKeyPrefix is a constant defining the prefix for the database keys of contract metadata entries.
const VariableKeyPrefix = "contract:variable:entry"
VariableKeyPrefix is a constant defining the prefix for the database keys of contract metadata entries.
Variables ¶
This section is empty.
Functions ¶
func AcquireLock ¶
func CheckIfLocked ¶
func DeleteApiKeys ¶
func DeleteApiKeys(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, apiKeys ...*ApiKey) error
DeleteApiKeys deletes the ApiKey instance from the Postgresql database.
func GetAccountKey ¶
func GetConstructorKey ¶
func GetContractEventReferencesByReferenceIDs ¶
func GetContractEventReferencesByReferenceIDs(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, addr common.Address, referenceIds []string) ([]string, error)
GetContractEventReferencesByReferenceIDs retrieves a multiple contract function from the database based on a unique combination of network_id and contract id.
func GetContractFunctionReferencesByIDs ¶
func GetContractFunctionReferencesByIDs(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, addr common.Address, referenceIds []string) ([]string, error)
GetContractFunctionReferencesByIDs retrieves a multiple contract function from the database based on a unique combination of network_id and contract id.
func GetFunctionKey ¶
func GetMetadataKey ¶
func GetStandardKey ¶
func GetTokenKey ¶
func SaveAccounts ¶
func SaveAccounts(ctx context.Context, redisCache *cache.Redis, dbAdapter *db.Postgres, accounts ...*Account) error
SaveAccounts performs an upsert (insert or update) of multiple Accounts instances in the Postgres database in a batched transaction.
func SaveApiKeys ¶
func SaveApiKeys(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, apiKeys ...*ApiKey) error
SaveApiKeys saves the ApiKey instance to the Postgresql database.
func SaveCfg ¶
func SaveCfg(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, cfgs ...*Cfg) error
SaveCfg saves a Cfg instance to the Postgres database.
func SaveConstructors ¶
func SaveConstructors(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, constructors ...*Constructor) error
SaveConstructors saves a list of Constructor instances or one to the Postgres database.
func SaveContract ¶
SaveContract performs an upsert (insert or update) of multiple Contract instances in the PostgreSQL database in a batched transaction.
func SaveEvents ¶
func SaveEvents(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, events ...*Event) error
SaveEvents saves a Event instance to the Postgres database.
func SaveFunctions ¶
func SaveFunctions(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, fns ...*Function) error
SaveFunctions saves a Function instance to the Postgres database.
func SaveMetadata ¶
func SaveMetadata(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, metadatas ...*Metadata) error
SaveMetadata saves a batch of Metadata instances into the PostgreSQL database.
func SaveStandards ¶
func SaveStandards(ctx context.Context, dbAdapter *db.Postgres, redisCache *cache.Redis, standards ...*Standard) error
SaveStandards saves a Standard instance (bulk) to the Postgres database.
Types ¶
type Account ¶
type Account struct { Id uuid.UUID NetworkId types.BigInt CreationBlock types.BigInt CreationTxHash string Address string Name string ENS string Tags []string Type string Balance string Blacklisted bool BlacklistReasons []string BlacklistContractReferences []string BlacklistAccountReferences []string BlacklistTransactionReferences []string CompletedStates []string FailedStates []string Processed bool Partial bool CreatedAt time.Time UpdatedAt time.Time }
func GetAccountByNetworkId ¶
func GetAccounts ¶
func GetAccounts(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, offset uint) ([]*Account, error)
GetAccounts retrieves a list of all accounts from the database based on a unique combination of network_id (paginated).
func GetAccountsByTags ¶
func GetAccountsByTags(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, tags []string, limit uint, offset uint) ([]*Account, error)
GetAccountsByTags retrieves a list of all accounts from the database based on a unique combination of network_id and tags (paginated).
func (*Account) EncodeCursor ¶
func (*Account) GetKey ¶
GetKey constructs and returns a unique key for the entry combining the prefix, network, networkID, and address.
func (*Account) IsCompleted ¶
type ApiKey ¶
type ApiKey struct { Id uuid.UUID `json:"id"` OrganizationId uuid.UUID `json:"organizationId"` ProfileId string `json:"profileId"` Label string `json:"label"` Key string `json:"key"` Roles []string `json:"roles"` RateLimit int32 `json:"rateLimit"` RateLimitDuration string `json:"rateLimitDuration"` Enabled bool `json:"enabled"` Suspended bool `json:"suspended"` CreatedAt time.Time `ch:"created_at"` UpdatedAt time.Time `ch:"updated_at"` }
func GetApiKeyByID ¶
func GetApiKeyByKey ¶
func GetApiKeyByProfileId ¶
func GetApiKeys ¶
func (*ApiKey) EncodeCursor ¶
func (*ApiKey) GenerateKey ¶
type Ast ¶
type Ast struct { Id uuid.UUID NetworkId types.BigInt ContractAddress string UnitsCount int64 ContractsCount int64 InterfacesCount int64 LibrariesCount int64 StateVariablesCount int64 FunctionsCount int64 EventsCount int64 Processed bool Partial bool CreatedAt time.Time UpdatedAt time.Time }
func GetAstByContractAddress ¶
func GetAstByContractAddress(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, addr common.Address) (*Ast, error)
GetAstByContractAddress retrieves a single contract ast from the database based on a unique combination of network_id and contract id.
func (*Ast) EncodeCursor ¶
func (*Ast) IsCompleted ¶
type Cfg ¶
type Cfg struct { Id uuid.UUID NetworkId types.BigInt ContractAddress string Mermaid string Processed bool Partial bool CreatedAt time.Time UpdatedAt time.Time }
func GetCfgByContractAddress ¶
func GetCfgs ¶
func GetCfgs(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, offset uint) ([]*Cfg, error)
GetCfgs retrieves a list of all accounts from the database based on a unique combination of network_id (paginated).
func (*Cfg) EncodeCursor ¶
func (*Cfg) IsCompleted ¶
type Constructor ¶
type Constructor struct { Id uuid.UUID NetworkId types.BigInt ContractAddress string Signature string Arguments string ArgumentsRaw string Abi string Unit string Processed bool Partial bool CreatedAt time.Time UpdatedAt time.Time }
func GetConstructors ¶
func GetConstructors(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, offset uint) ([]*Constructor, error)
GetConstructors retrieves a list of all constructors from the database based on a unique combination of network_id (paginated).
func GetConstructorsByContract ¶
func GetConstructorsByContract(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, address common.Address, limit uint, offset uint) ([]*Constructor, error)
GetConstructorsByContract retrieves a list of all constructors from the database based on a unique combination of network_id and contract address (paginated).
func (*Constructor) EncodeCursor ¶
func (c *Constructor) EncodeCursor() string
func (*Constructor) GetKey ¶
func (c *Constructor) GetKey() string
func (*Constructor) IsCompleted ¶
func (c *Constructor) IsCompleted() bool
type Contract ¶
type Contract struct { Id uuid.UUID NetworkId types.BigInt BlockNumber types.BigInt BlockHash types.Hash TransactionHash types.Hash DeployerAddress types.Address Address types.Address Name string Standards []string Proxy bool License string CompilerVersion string SolgoVersion string Optimized bool OptimizationRuns uint64 EVMVersion string ABI string EntryUnitName string Verified bool SourcesProvider string VerificationProvider string ExecutionBytecode string Bytecode string SafetyState string SourceAvailable bool SelfDestructed bool ProxyImplementations []string CompletedStates []string FailedStates []string Processed bool Partial bool CreatedAt time.Time UpdatedAt time.Time ReprocessAttempt int32 LastReprocessAttempt time.Time }
func GetContractByAddress ¶
func GetContractByAddress(ctx context.Context, db *db.Postgres, networkId *big.Int, address common.Address) (*Contract, error)
GetContractByAddress retrieves a single contract from the database based on a unique combination of network_id, block_number, and address.
func GetContractByTransactionHash ¶
func GetContractByTransactionHash(ctx context.Context, db *db.Postgres, networkId *big.Int, hash common.Hash) (*Contract, error)
GetContractByTransactionHash retrieves a single contract from the database based on a unique combination of network_id, block_number, and address.
func GetContracts ¶
func GetContracts(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, offset uint) ([]*Contract, error)
GetContracts retrieves a list of all contracts from the database based on a unique combination of network_id and pagination.
func GetContractsByBlockNumber ¶
func GetContractsByBlockNumber(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, blockNumber *big.Int, limit uint, offset uint) ([]*Contract, error)
GetContractsByBlockNumber retrieves a list of all contracts from the database based on a unique combination of network_id and pagination.
func GetContractsByDeployerAddress ¶
func GetContractsByDeployerAddress(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, deployer common.Address, limit uint, offset uint) ([]*Contract, error)
GetContractsByDeployerAddress retrieves a list of all contracts from the database based on a unique combination of network_id and pagination.
func GetContractsByStandards ¶
func GetContractsByStandards(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, standards []string, limit uint, offset uint) ([]*Contract, error)
GetContractsByStandards retrieves a list of all contracts from the database based on a unique combination of network_id and pagination.
func (*Contract) EncodeCursor ¶
func (*Contract) GetKey ¶
GetKey constructs and returns a unique key for the entry combining the prefix, network, networkID, and address.
func (*Contract) IsCompleted ¶
type DbStat ¶
type DbStat struct { TableName string `json:"tableName" doc:"Name of the table."` // Name of the table. TotalRows big.Int `json:"totalRows" doc:"Total number of rows in the table."` // Total number of rows in the table. TotalBytes big.Float `json:"totalSizeInBytes" doc:"Total size of the table in bytes."` // Total size of the table in bytes. TotalBytesMb big.Float `json:"totalSizeInMb" doc:"Total size of the table in MB."` // Total size of the table in MB. }
DbStat represents statistical data for a database table.
type DbStats ¶
type DbStats struct { Database string `json:"database" doc:"Name of the database."` // Name of the database. Dialect string `json:"dialect" doc:"Dialect used by the database"` // Dialect used by the database Tables []*DbStat `json:"tables" doc:"Statistical data for each table in the database."` // Statistical data for each table in the database. DatabaseSizeBytes big.Float `json:"databaseSizeBytes" doc:"Total size of the database in bytes."` // Total size of the database in bytes. DatabaseSizeMb big.Float `json:"databaseSizeMb" doc:"Total size of the database in MB."` // Total size of the database in MB. }
DbStats represents statistical data for a database.
func GetDatabaseStats ¶
func GetDatabaseStats(ctx context.Context, dbAdapter *db.Postgres, opts *options.Dialect, roles []string) (*DbStats, error)
GetDatabaseStats retrieves full database statistics (mostly just counts). WARN: Due to the speed of the query, it is going to return approximate counts and bytes
type Event ¶
type Event struct { Id uuid.UUID NetworkId types.BigInt ContractAddress string ReferenceId string Name string Signature string SignatureRaw string SignatureBytes string Anonymous bool Abi string Unit string Processed bool Partial bool CreatedAt time.Time UpdatedAt time.Time }
func GetContractEventBySignature ¶
func GetContractEventBySignature(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, addr common.Address, signature common.Hash) (*Event, error)
GetContractEventBySignature retrieves a single contract event from the database based on a unique combination of network_id, contract id and log signature (topic 0).
func GetEventBySignature ¶
func GetEvents ¶
func GetEvents(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, offset uint) ([]*Event, error)
GetEvents retrieves a list of all functions from the database based on a unique combination of network_id (paginated).
func GetEventsByContract ¶
func GetEventsBySignature ¶
func GetEventsBySignature(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, signature common.Hash, limit uint, offset uint) ([]*Event, error)
GetEventsBySignature retrieves a list of events from the database based on a unique combination of network_id and signature.
func (*Event) EncodeCursor ¶
func (*Event) IsCompleted ¶
type Function ¶
type Function struct { Id uuid.UUID NetworkId types.BigInt ContractAddress string ReferenceId string Name string Signature string SignatureRaw string SignatureBytes string Abi string Implemented bool Visibility string Mutability string Virtual bool Unit string Processed bool Partial bool CreatedAt time.Time UpdatedAt time.Time }
func GetContractFunctionBySignature ¶
func GetContractFunctionBySignature(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, addr common.Address, signature string) (*Function, error)
GetContractFunctionBySignature retrieves a single contract function from the database based on a unique combination of network_id and contract id and signature.
func GetFunctionBySignature ¶
func GetFunctionBySignature(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, signature string) (*Function, error)
GetFunctionBySignature retrieves a single function from the database based on a unique combination of network_id and contract id and signature.
func GetFunctions ¶
func GetFunctions(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, offset uint) ([]*Function, error)
GetFunctions retrieves a list of all functions from the database based on a unique combination of network_id (paginated).
func GetFunctionsByContract ¶
func GetFunctionsByContract(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, address common.Address, limit uint, offset uint) ([]*Function, error)
GetFunctionsByContract retrieves a list of all functions from the database based on a unique combination of network_id and contract address (paginated).
func GetFunctionsByContractAndName ¶
func GetFunctionsByContractAndName(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, address common.Address, names []string, limit uint, offset uint) ([]*Function, error)
GetFunctionsByContractAndName retrieves a list of all functions from the database based on a unique combination of network_id, contract address and function name (paginated).
func GetFunctionsBySignature ¶
func GetFunctionsBySignature(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, signature string, limit uint, offset uint) ([]*Function, error)
GetFunctionsBySignature retrieves a list of functions from the database based on a unique combination of network_id and signature.
func (*Function) EncodeCursor ¶
func (*Function) IsCompleted ¶
type Metadata ¶
type Metadata struct { Id uuid.UUID NetworkId types.BigInt ContractAddress string CborLength int16 AuxBytes string Ipfs string Bzzr0 string Bzzr1 string SolcVersion string Metadata string Processed bool Partial bool CreatedAt time.Time UpdatedAt time.Time }
func GetContractMetadataByAddress ¶
func GetContractMetadataByAddress(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, addr common.Address) (*Metadata, error)
GetContractMetadataByAddress retrieves a single contract metadata from the database based on a unique combination of network_id and contract address.
func (*Metadata) EncodeCursor ¶
func (*Metadata) GetKey ¶
GetKey constructs and returns a unique key for the entry combining the prefix, network, networkID, and address.
func (*Metadata) IsCompleted ¶
type Standard ¶
type Standard struct { Id uuid.UUID NetworkId types.BigInt ContractAddress string Name string Type standards.Standard Confidence string ConfidencePoints float64 DiscoveredTokens int64 MaximumTokens int64 Threshold float64 Unit string Processed bool Partial bool CreatedAt time.Time UpdatedAt time.Time }
func GetStandards ¶
func GetStandards(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, offset uint) ([]*Standard, error)
GetStandards retrieves a list of all contracts from the database based on a unique combination of network_id and pagination.
func GetStandardsByContract ¶
func GetStandardsByTypes ¶
func (*Standard) EncodeCursor ¶
func (*Standard) IsCompleted ¶
type Token ¶
type Token struct { Id uuid.UUID NetworkId types.BigInt ContractAddress string Name string Symbol string Decimals int64 TotalSupply string Valid bool CompletedStates []string FailedStates []string Processed bool Partial bool CreatedAt time.Time UpdatedAt time.Time }
func GetTokenByContractAddress ¶
func GetTokenByContractAddress(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, addr common.Address) (*Token, error)
GetTokenByContractAddress retrieves a single token from the database based on a unique combination of network_id and contract address.
func GetTokens ¶
func GetTokens(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, offset uint) ([]*Token, error)
GetTokens retrieves a list of all tokens from the database based on a unique combination of network_id.
func GetTokensBySymbol ¶
func GetTokensBySymbol(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, symbol string, limit uint, offset uint) ([]*Token, error)
GetTokensBySymbol retrieves a list of tokens from the database based on a unique combination of network_id and symbol.
func (*Token) EncodeCursor ¶
func (*Token) IsCompleted ¶
type Variable ¶
type Variable struct { Id uuid.UUID NetworkId types.BigInt ContractAddress string Name string Type string StateMutability string Visibility string IsConstant bool IsAddress bool IsContract bool IsArray bool IsDynamicArray bool IsMapping bool IsStruct bool StorageIndex int64 StorageSize int64 StorageOffset int64 Unit string Processed bool Partial bool CreatedAt time.Time UpdatedAt time.Time }
func GetVariables ¶
func GetVariables(ctx context.Context, dbAdapter *db.Postgres, networkId *big.Int, limit uint, offset uint) ([]*Variable, error)
GetVariables retrieves a list of all variables from the database based on a unique combination of network_id and pagination.