postgres

package
v0.0.0-...-8ad73b1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChainBitcoin = iota
	ChainEthereum
	ChainEthereumClassic
	ChainBitcoinCash
	ChainCallisto
	ChainRavenCoin
)
View Source
const (
	PlatformWeb = iota + 1
	PlatformDesktop
)

Variables

This section is empty.

Functions

func BulkInsertTransactions

func BulkInsertTransactions(db *sql.DB, ethTxns []EthTransaction) error

func GetLatestBlockInDB

func GetLatestBlockInDB(db *sql.DB) (latestBlock *int64, err error)

getAccounts retrieve a list of accounts for a particular blockchain.

func InitDB

func InitDB() (*sql.DB, error)

Types

type EthTransaction

type EthTransaction struct {
	Time          int64
	TxnFrom       common.Address
	TxnTo         common.Address
	Gas           uint64
	GasPrice      *big.Int
	Block         int64
	TxnHash       string
	Value         float64
	ContractTo    common.Address `json:"contract_to"`
	ContractValue string         `json:"contract_value"`
}

func GetEthTransactions

func GetEthTransactions(db *sql.DB, address common.Address) ([]EthTransaction, error)

getAccounts retrieve a list of accounts for a particular blockchain.

Jump to

Keyboard shortcuts

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