models

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContractType = make(map[int32]map[string]Asset)

Functions

This section is empty.

Types

type Add20AssetParams

type Add20AssetParams struct {
	ChainID      int32     `json:"chainId"`
	CollectionID string    `json:"collectionId"`
	Owner        string    `json:"owner"`
	Balance      string    `json:"balance"`
	UpdatedBy    uuid.UUID `json:"updatedBy"`
	Signature    string    `json:"signature"`
}

type Add721AssetParams

type Add721AssetParams struct {
	ChainID      int32          `json:"chainId"`
	CollectionID string         `json:"collectionId"`
	TokenID      string         `json:"tokenId"`
	Owner        string         `json:"owner"`
	Attributes   sql.NullString `json:"attributes"`
	UpdatedBy    uuid.UUID      `json:"updatedBy"`
	Signature    string         `json:"signature"`
}

type Add1155AssetParams

type Add1155AssetParams struct {
	ChainID      int32          `json:"chainId"`
	CollectionID string         `json:"collectionId"`
	TokenID      string         `json:"tokenId"`
	Owner        string         `json:"owner"`
	Balance      string         `json:"balance"`
	Attributes   sql.NullString `json:"attributes"`
	UpdatedBy    uuid.UUID      `json:"updatedBy"`
	Signature    string         `json:"signature"`
}

type AddBackfillCrawlerParams

type AddBackfillCrawlerParams struct {
	ChainID           int32  `json:"chainId"`
	CollectionAddress string `json:"collectionAddress"`
	CurrentBlock      int64  `json:"currentBlock"`
}

type AddNewAssetParams

type AddNewAssetParams struct {
	ID                string        `json:"id"`
	ChainID           int32         `json:"chainId"`
	CollectionAddress string        `json:"collectionAddress"`
	Type              AssetType     `json:"type"`
	DecimalData       sql.NullInt16 `json:"decimalData"`
	InitialBlock      sql.NullInt64 `json:"initialBlock"`
	LastUpdated       sql.NullTime  `json:"lastUpdated"`
}

type AddOnchainTransactionParams

type AddOnchainTransactionParams struct {
	From      string    `json:"from"`
	To        string    `json:"to"`
	AssetID   string    `json:"assetId"`
	TokenID   string    `json:"tokenId"`
	Amount    string    `json:"amount"`
	TxHash    string    `json:"txHash"`
	Timestamp time.Time `json:"timestamp"`
}

type App

type App struct {
	ID        uuid.UUID `json:"id"`
	Name      string    `json:"name"`
	SecretKey string    `json:"secretKey"`
}

type Asset

type Asset struct {
	ID                string        `json:"id"`
	ChainID           int32         `json:"chainId"`
	CollectionAddress string        `json:"collectionAddress"`
	Type              AssetType     `json:"type"`
	CreatedAt         time.Time     `json:"createdAt"`
	UpdatedAt         time.Time     `json:"updatedAt"`
	DecimalData       sql.NullInt16 `json:"decimalData"`
	InitialBlock      sql.NullInt64 `json:"initialBlock"`
	LastUpdated       sql.NullTime  `json:"lastUpdated"`
}

type AssetType

type AssetType string
const (
	AssetTypeERC721  AssetType = "ERC721"
	AssetTypeERC1155 AssetType = "ERC1155"
	AssetTypeERC20   AssetType = "ERC20"
)

func (*AssetType) Scan

func (e *AssetType) Scan(src interface{}) error

type BackfillCrawler

type BackfillCrawler struct {
	ChainID           int32         `json:"chainId"`
	CollectionAddress string        `json:"collectionAddress"`
	CurrentBlock      int64         `json:"currentBlock"`
	Status            CrawlerStatus `json:"status"`
	CreatedAt         time.Time     `json:"createdAt"`
}

type Chain

type Chain struct {
	ID          int32  `json:"id"`
	Chain       string `json:"chain"`
	Name        string `json:"name"`
	RpcUrl      string `json:"rpcUrl"`
	ChainID     int64  `json:"chainId"`
	Explorer    string `json:"explorer"`
	LatestBlock int64  `json:"latestBlock"`
	BlockTime   int32  `json:"blockTime"`
}

type CrawlerStatus

type CrawlerStatus string
const (
	CrawlerStatusCRAWLING CrawlerStatus = "CRAWLING"
	CrawlerStatusCRAWLED  CrawlerStatus = "CRAWLED"
)

func (*CrawlerStatus) Scan

func (e *CrawlerStatus) Scan(src interface{}) error

type Erc20CollectionAsset

type Erc20CollectionAsset struct {
	ID        uuid.UUID `json:"id"`
	ChainID   int32     `json:"chainId"`
	AssetID   string    `json:"assetId"`
	Owner     string    `json:"owner"`
	Balance   string    `json:"balance"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type Erc721CollectionAsset

type Erc721CollectionAsset struct {
	ID         uuid.UUID      `json:"id"`
	ChainID    int32          `json:"chainId"`
	AssetID    string         `json:"assetId"`
	TokenID    string         `json:"tokenId"`
	Owner      string         `json:"owner"`
	Attributes sql.NullString `json:"attributes"`
	CreatedAt  time.Time      `json:"createdAt"`
	UpdatedAt  time.Time      `json:"updatedAt"`
}

type Erc1155CollectionAsset

type Erc1155CollectionAsset struct {
	ID         uuid.UUID      `json:"id"`
	ChainID    int32          `json:"chainId"`
	AssetID    string         `json:"assetId"`
	TokenID    string         `json:"tokenId"`
	Owner      string         `json:"owner"`
	Balance    string         `json:"balance"`
	Attributes sql.NullString `json:"attributes"`
	CreatedAt  time.Time      `json:"createdAt"`
	UpdatedAt  time.Time      `json:"updatedAt"`
}

type Erc1155TotalSupply

type Erc1155TotalSupply struct {
	AssetID     string         `json:"assetId"`
	TokenID     string         `json:"tokenId"`
	Attributes  sql.NullString `json:"attributes"`
	TotalSupply int64          `json:"totalSupply"`
}

type GetCrawlingBackfillCrawlerRow

type GetCrawlingBackfillCrawlerRow struct {
	ChainID           int32         `json:"chainId"`
	CollectionAddress string        `json:"collectionAddress"`
	CurrentBlock      int64         `json:"currentBlock"`
	Status            CrawlerStatus `json:"status"`
	CreatedAt         time.Time     `json:"createdAt"`
	Type              AssetType     `json:"type"`
	InitialBlock      sql.NullInt64 `json:"initialBlock"`
}

type NullAssetType

type NullAssetType struct {
	AssetType AssetType `json:"assetType"`
	Valid     bool      `json:"valid"` // Valid is true if AssetType is not NULL
}

func (*NullAssetType) Scan

func (ns *NullAssetType) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullAssetType) Value

func (ns NullAssetType) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullCrawlerStatus

type NullCrawlerStatus struct {
	CrawlerStatus CrawlerStatus `json:"crawlerStatus"`
	Valid         bool          `json:"valid"` // Valid is true if CrawlerStatus is not NULL
}

func (*NullCrawlerStatus) Scan

func (ns *NullCrawlerStatus) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullCrawlerStatus) Value

func (ns NullCrawlerStatus) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type OnchainHistory

type OnchainHistory struct {
	ID        uuid.UUID `json:"id"`
	From      string    `json:"from"`
	To        string    `json:"to"`
	AssetID   string    `json:"assetId"`
	TokenID   string    `json:"tokenId"`
	Amount    string    `json:"amount"`
	TxHash    string    `json:"txHash"`
	Timestamp time.Time `json:"timestamp"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type UpdateCrawlingBackfillParams

type UpdateCrawlingBackfillParams struct {
	ChainID           int32         `json:"chainId"`
	CollectionAddress string        `json:"collectionAddress"`
	Status            CrawlerStatus `json:"status"`
	CurrentBlock      int64         `json:"currentBlock"`
}

Jump to

Keyboard shortcuts

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