chain

package
v2.0.0-alpha.21 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTotalChainCount

func GetTotalChainCount(dbConnPgx utils.PgxIface) (*int, error)

func InsertChain

func InsertChain(dbConnPgx utils.PgxIface, chain *Chain) (int, error)

func InsertChains

func InsertChains(dbConnPgx utils.PgxIface, chains []Chain) error

func RemoveChain

func RemoveChain(dbConnPgx utils.PgxIface, chainID *int) error

func UpdateChain

func UpdateChain(dbConnPgx utils.PgxIface, chain *Chain) error

Types

type Chain

type Chain struct {
	ID               *int      `json:"id" db:"id"`                               //1
	UUID             string    `json:"uuid" db:"uuid"`                           //2
	BaseAssetID      *int      `json:"baseAssetId" db:"base_asset_id"`           //3
	Name             string    `json:"name" db:"name" db:"name"`                 //4
	AlternateName    string    `json:"alternateName" db:"alternate_name"`        //5
	Address          string    `json:"address" db:"address"`                     //6
	ChainTypeID      *int      `json:"chainTypeId" db:"chain_type_id"`           //7
	Description      string    `json:"description" db:"description"`             //8
	CreatedBy        string    `json:"createdBy" db:"created_by"`                //9
	CreatedAt        time.Time `json:"createdAt" db:"created_at"`                //10
	UpdatedBy        string    `json:"updatedBy" db:"updated_by"`                //11
	UpdatedAt        time.Time `json:"updatedAt" db:"updated_at"`                //12
	RpcURL           string    `json:"rpcUrl" db:"rpc_url"`                      //13
	ChainID          *int      `json:"chainId" db:"chain_id"`                    //14
	BlockExplorerURL string    `json:"blockExplorerUrl" db:"block_explorer_url"` //15
	RpcURLDev        string    `json:"rpcUrlDev" db:"rpc_url_dev"`               //16
	RpcURLProd       string    `json:"rpcUrlProd" db:"rpc_url_prod"`             //17
	RpcURLArchive    string    `json:"rpcUrlArchive" db:"rpc_url_archive"`       //18
}

Asset

func GetChain

func GetChain(dbConnPgx utils.PgxIface, chainID *int) (*Chain, error)

func GetChainByAddress

func GetChainByAddress(dbConnPgx utils.PgxIface, address string) (*Chain, error)

func GetChainByAlternateName

func GetChainByAlternateName(dbConnPgx utils.PgxIface, altenateName string) (*Chain, error)

func GetChainList

func GetChainList(dbConnPgx utils.PgxIface, ids []int) ([]Chain, error)

func GetChainListByPagination

func GetChainListByPagination(dbConnPgx utils.PgxIface, _start, _end *int, _order, _sort string, _filters []string) ([]Chain, error)

Jump to

Keyboard shortcuts

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