fulldb

package
v0.0.0-...-9f09256 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright © 2022 uscan team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var (
	ContractVerityPrefix    = []byte("contract/info/")
	ContractVerityTmpPrefix = []byte("contract/tmp/")
	ContractMethodPrefix    = []byte("method/")
)

Functions

func DelErc1155HolderAmount

func DelErc1155HolderAmount(ctx context.Context, db kv.Sorter, contract common.Address, holder *types.Holder) (err error)

/ ------------------- erc1155 holder ---------------------

func DelErc20HolderAmount

func DelErc20HolderAmount(ctx context.Context, db kv.Sorter, contract common.Address, holder *types.Holder) (err error)

/ ------------------- erc20 holder ---------------------

func DelErc721HolderAmount

func DelErc721HolderAmount(ctx context.Context, db kv.Sorter, contract common.Address, holder *types.Holder) (err error)

/ ------------------- erc721 holder ---------------------

func GetErc1155Holder

func GetErc1155Holder(ctx context.Context, db kv.Sorter, contract common.Address, offset, limit uint64) (holders []*types.Holder, err error)

func GetErc1155HolderCount

func GetErc1155HolderCount(ctx context.Context, db kv.Sorter, contract common.Address) (count uint64, err error)

func GetErc1155Inventory

func GetErc1155Inventory(ctx context.Context, db kv.Sorter, contract common.Address, offset, limit uint64) (inventorys []*field.BigInt, err error)

func GetErc1155InventoryCount

func GetErc1155InventoryCount(ctx context.Context, db kv.Sorter, contract common.Address) (count uint64, err error)

func GetErc20Holder

func GetErc20Holder(ctx context.Context, db kv.Sorter, contract common.Address, offset, limit uint64) (holders []*types.Holder, err error)

func GetErc20HolderCount

func GetErc20HolderCount(ctx context.Context, db kv.Sorter, contract common.Address) (count uint64, err error)

func GetErc721Holder

func GetErc721Holder(ctx context.Context, db kv.Sorter, contract common.Address, offset, limit uint64) (holders []*types.Holder, err error)

func GetErc721HolderCount

func GetErc721HolderCount(ctx context.Context, db kv.Sorter, contract common.Address) (count uint64, err error)

func GetErc721Inventory

func GetErc721Inventory(ctx context.Context, db kv.Sorter, contract common.Address, offset, limit uint64) (inventorys []*types.Inventory, err error)

func GetErc721InventoryCount

func GetErc721InventoryCount(ctx context.Context, db kv.Sorter, contract common.Address) (count uint64, err error)

func GetITxKey

func GetITxKey(hash common.Hash, index *field.BigInt) []byte

func GetITxTotalKey

func GetITxTotalKey(hash common.Hash) []byte

func ReadAccount

func ReadAccount(ctx context.Context, db kv.Reader, addr common.Address) (acc *types.Account, err error)

----------------- account info -----------------

func ReadAccountErc1155ByIndex

func ReadAccountErc1155ByIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (data *types.Erc1155Transfer, err error)

func ReadAccountErc1155Index

func ReadAccountErc1155Index(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (erc1155TransferIndex *field.BigInt, err error)

func ReadAccountErc1155Total

func ReadAccountErc1155Total(ctx context.Context, db kv.Reader, addr common.Address) (total *field.BigInt, err error)

func ReadAccountErc20ByIndex

func ReadAccountErc20ByIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (data *types.Erc20Transfer, err error)

func ReadAccountErc20Index

func ReadAccountErc20Index(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (erc20TransferIndex *field.BigInt, err error)

func ReadAccountErc20Total

func ReadAccountErc20Total(ctx context.Context, db kv.Reader, addr common.Address) (total *field.BigInt, err error)

func ReadAccountErc721ByIndex

func ReadAccountErc721ByIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (data *types.Erc721Transfer, err error)

func ReadAccountErc721Index

func ReadAccountErc721Index(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (erc721TransferIndex *field.BigInt, err error)

func ReadAccountErc721Total

func ReadAccountErc721Total(ctx context.Context, db kv.Reader, addr common.Address) (total *field.BigInt, err error)

func ReadAccountITxByIndex

func ReadAccountITxByIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (itx *types.InternalTx, err error)

func ReadAccountITxIndex

func ReadAccountITxIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (data *types.InternalTxKey, err error)

func ReadAccountITxTotal

func ReadAccountITxTotal(ctx context.Context, db kv.Reader, addr common.Address) (total *field.BigInt, err error)

func ReadAccountTxByIndex

func ReadAccountTxByIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (tx *types.Tx, err error)

func ReadAccountTxIndex

func ReadAccountTxIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (hash common.Hash, err error)

func ReadAccountTxTotal

func ReadAccountTxTotal(ctx context.Context, db kv.Reader, addr common.Address) (total *field.BigInt, err error)

func ReadBlock

func ReadBlock(ctx context.Context, db kv.Reader, blockNum *field.BigInt) (bk *types.Block, err error)

func ReadBlockIndex

func ReadBlockIndex(ctx context.Context, db kv.Reader, blockNum *field.BigInt, index *field.BigInt) (txHash common.Hash, err error)

func ReadBlockTxByIndex

func ReadBlockTxByIndex(ctx context.Context, db kv.Reader, blockNum *field.BigInt, index *field.BigInt) (tx *types.Tx, err error)

func ReadContract

func ReadContract(ctx context.Context, db kv.Reader, addr common.Address) (acc *types.Contract, err error)

----------------- contract info -----------------

func ReadErc1155ContractTotal

func ReadErc1155ContractTotal(ctx context.Context, db kv.Reader, contract common.Address) (total *field.BigInt, err error)

func ReadErc1155ContractTransfer

func ReadErc1155ContractTransfer(ctx context.Context, db kv.Reader, contract common.Address, index *field.BigInt) (data *field.BigInt, err error)

func ReadErc1155HolderAmount

func ReadErc1155HolderAmount(ctx context.Context, db kv.Reader, contract common.Address, addr common.Address) (amount *field.BigInt, err error)

func ReadErc1155HolderTokenIdQuantity

func ReadErc1155HolderTokenIdQuantity(ctx context.Context, db kv.Reader, contract common.Address, addr common.Address, tokenId *field.BigInt) (quantity *field.BigInt, err error)

func ReadErc1155Total

func ReadErc1155Total(ctx context.Context, db kv.Reader) (total *field.BigInt, err error)

func ReadErc1155Transfer

func ReadErc1155Transfer(ctx context.Context, db kv.Reader, index *field.BigInt) (data *types.Erc1155Transfer, err error)

func ReadErc20ContractTotal

func ReadErc20ContractTotal(ctx context.Context, db kv.Reader, contract common.Address) (total *field.BigInt, err error)

func ReadErc20ContractTransfer

func ReadErc20ContractTransfer(ctx context.Context, db kv.Reader, contract common.Address, index *field.BigInt) (data *field.BigInt, err error)

func ReadErc20HolderAmount

func ReadErc20HolderAmount(ctx context.Context, db kv.Reader, contract common.Address, addr common.Address) (amount *field.BigInt, err error)

func ReadErc20Total

func ReadErc20Total(ctx context.Context, db kv.Reader) (total *field.BigInt, err error)

func ReadErc20Transfer

func ReadErc20Transfer(ctx context.Context, db kv.Reader, index *field.BigInt) (data *types.Erc20Transfer, err error)

func ReadErc721ContractTotal

func ReadErc721ContractTotal(ctx context.Context, db kv.Reader, contract common.Address) (total *field.BigInt, err error)

func ReadErc721ContractTransfer

func ReadErc721ContractTransfer(ctx context.Context, db kv.Reader, contract common.Address, index *field.BigInt) (data *field.BigInt, err error)

func ReadErc721HolderAmount

func ReadErc721HolderAmount(ctx context.Context, db kv.Reader, contract common.Address, addr common.Address) (amount *field.BigInt, err error)

func ReadErc721HolderTokenIdQuantity

func ReadErc721HolderTokenIdQuantity(ctx context.Context, db kv.Reader, contract common.Address, addr common.Address, tokenId *field.BigInt) (quantity *field.BigInt, err error)

func ReadErc721Total

func ReadErc721Total(ctx context.Context, db kv.Reader) (total *field.BigInt, err error)

func ReadErc721Transfer

func ReadErc721Transfer(ctx context.Context, db kv.Reader, index *field.BigInt) (data *types.Erc721Transfer, err error)

func ReadHome

func ReadHome(ctx context.Context, db kv.Reader) (home *types.Home, err error)

func ReadITx

func ReadITx(ctx context.Context, db kv.Reader, hash common.Hash, index *field.BigInt) (data *types.InternalTx, err error)

func ReadITxTotal

func ReadITxTotal(ctx context.Context, db kv.Reader, hash common.Hash) (total *field.BigInt, err error)

func ReadMethodName

func ReadMethodName(ctx context.Context, db kv.Reader, methodID string) (data string, err error)

func ReadProxyContract

func ReadProxyContract(ctx context.Context, db kv.Reader, proxy common.Address) (logic common.Address, err error)

func ReadRt

func ReadRt(ctx context.Context, db kv.Reader, hash common.Hash) (data *types.Rt, err error)

func ReadSyncingBlock

func ReadSyncingBlock(ctx context.Context, db kv.Reader) (bk *field.BigInt, err error)

func ReadTraceTx

func ReadTraceTx(ctx context.Context, db kv.Reader, hash common.Hash) (res *types.TraceTx, err error)

func ReadTraceTx2

func ReadTraceTx2(ctx context.Context, db kv.Reader, hash common.Hash) (res *types.TraceTx2, err error)

func ReadTx

func ReadTx(ctx context.Context, db kv.Reader, hash common.Hash) (data *types.Tx, err error)

func ReadTxByIndex

func ReadTxByIndex(ctx context.Context, db kv.Reader, index *field.BigInt) (data *types.Tx, err error)

func ReadTxTotal

func ReadTxTotal(ctx context.Context, db kv.Reader) (total *field.BigInt, err error)

func ReadValidateContract

func ReadValidateContract(ctx context.Context, db kv.Reader, address common.Address) (data *types.ContractVerity, err error)

func ReadValidateContractMetadata

func ReadValidateContractMetadata(ctx context.Context, db kv.Reader) (acc *types.ValidateContractMetadata, err error)

func ReadValidateContractStatus

func ReadValidateContractStatus(ctx context.Context, db kv.Reader, address common.Address) (status *big.Int, err error)

func WriteAccount

func WriteAccount(ctx context.Context, db kv.Database, addr common.Address, acc *types.Account) error

func WriteAccountErc1155Index

func WriteAccountErc1155Index(ctx context.Context, db kv.Writer, addr common.Address, index *field.BigInt, erc1155TransferIndex *field.BigInt) (err error)

func WriteAccountErc1155Total

func WriteAccountErc1155Total(ctx context.Context, db kv.Writer, addr common.Address, total *field.BigInt) (err error)

func WriteAccountErc20Index

func WriteAccountErc20Index(ctx context.Context, db kv.Writer, addr common.Address, index *field.BigInt, erc20TransferIndex *field.BigInt) (err error)

func WriteAccountErc20Total

func WriteAccountErc20Total(ctx context.Context, db kv.Writer, addr common.Address, total *field.BigInt) (err error)

func WriteAccountErc721Index

func WriteAccountErc721Index(ctx context.Context, db kv.Writer, addr common.Address, index *field.BigInt, erc721TransferIndex *field.BigInt) (err error)

func WriteAccountErc721Total

func WriteAccountErc721Total(ctx context.Context, db kv.Writer, addr common.Address, total *field.BigInt) (err error)

func WriteAccountITxIndex

func WriteAccountITxIndex(ctx context.Context, db kv.Writer, addr common.Address, index *field.BigInt, data *types.InternalTxKey) (err error)

func WriteAccountITxTotal

func WriteAccountITxTotal(ctx context.Context, db kv.Writer, addr common.Address, total *field.BigInt) (err error)

func WriteAccountTxIndex

func WriteAccountTxIndex(ctx context.Context, db kv.Writer, addr common.Address, index *field.BigInt, hash common.Hash) error

func WriteAccountTxTotal

func WriteAccountTxTotal(ctx context.Context, db kv.Writer, addr common.Address, total *field.BigInt) (err error)

func WriteBlock

func WriteBlock(ctx context.Context, db kv.Writer, blockNum *field.BigInt, bk *types.Block) (err error)

func WriteBlockIndex

func WriteBlockIndex(ctx context.Context, db kv.Writer, blockNum *field.BigInt, index *field.BigInt, txHash common.Hash) (err error)

func WriteContract

func WriteContract(ctx context.Context, db kv.Writer, addr common.Address, data *types.Contract) error

func WriteErc1155ContractTotal

func WriteErc1155ContractTotal(ctx context.Context, db kv.Writer, contract common.Address, total *field.BigInt) error

func WriteErc1155ContractTransfer

func WriteErc1155ContractTransfer(ctx context.Context, db kv.Writer, contract common.Address, index *field.BigInt, data *field.BigInt) (err error)

func WriteErc1155HolderAmount

func WriteErc1155HolderAmount(ctx context.Context, db kv.Database, contract common.Address, holder *types.Holder) (err error)

func WriteErc1155HolderTokenIdQuantity

func WriteErc1155HolderTokenIdQuantity(ctx context.Context, db kv.Database, contract common.Address, addr common.Address, tokenId *field.BigInt, quantity *field.BigInt) (err error)

func WriteErc1155Total

func WriteErc1155Total(ctx context.Context, db kv.Writer, total *field.BigInt) error

func WriteErc1155Transfer

func WriteErc1155Transfer(ctx context.Context, db kv.Writer, index *field.BigInt, data *types.Erc1155Transfer) (err error)

func WriteErc20ContractTotal

func WriteErc20ContractTotal(ctx context.Context, db kv.Writer, contract common.Address, total *field.BigInt) error

func WriteErc20ContractTransfer

func WriteErc20ContractTransfer(ctx context.Context, db kv.Writer, contract common.Address, index *field.BigInt, data *field.BigInt) (err error)

func WriteErc20HolderAmount

func WriteErc20HolderAmount(ctx context.Context, db kv.Database, contract common.Address, holder *types.Holder) (err error)

func WriteErc20Total

func WriteErc20Total(ctx context.Context, db kv.Writer, total *field.BigInt) error

func WriteErc20Transfer

func WriteErc20Transfer(ctx context.Context, db kv.Writer, index *field.BigInt, data *types.Erc20Transfer) (err error)

func WriteErc721ContractTotal

func WriteErc721ContractTotal(ctx context.Context, db kv.Writer, contract common.Address, total *field.BigInt) error

func WriteErc721ContractTransfer

func WriteErc721ContractTransfer(ctx context.Context, db kv.Writer, contract common.Address, index *field.BigInt, data *field.BigInt) (err error)

func WriteErc721HolderAmount

func WriteErc721HolderAmount(ctx context.Context, db kv.Database, contract common.Address, holder *types.Holder) (err error)

func WriteErc721HolderTokenIdQuantity

func WriteErc721HolderTokenIdQuantity(ctx context.Context, db kv.Database, contract common.Address, addr common.Address, tokenId *field.BigInt, quantity *field.BigInt) (err error)

func WriteErc721Total

func WriteErc721Total(ctx context.Context, db kv.Writer, total *field.BigInt) error

func WriteErc721Transfer

func WriteErc721Transfer(ctx context.Context, db kv.Writer, index *field.BigInt, data *types.Erc721Transfer) (err error)

func WriteHome

func WriteHome(ctx context.Context, db kv.Writer, home *types.Home) (err error)

func WriteITx

func WriteITx(ctx context.Context, db kv.Writer, hash common.Hash, index *field.BigInt, data *types.InternalTx) (err error)

func WriteItxTotal

func WriteItxTotal(ctx context.Context, db kv.Writer, hash common.Hash, total *field.BigInt) (err error)

func WriteMethodName

func WriteMethodName(ctx context.Context, db kv.Writer, methodID, methodName string) error

func WriteProxyContract

func WriteProxyContract(ctx context.Context, db kv.Writer, proxy common.Address, logic common.Address) error

-------------------- proxy contract -------------

func WriteRt

func WriteRt(ctx context.Context, db kv.Writer, hash common.Hash, data *types.Rt) (err error)

func WriteSyncingBlock

func WriteSyncingBlock(ctx context.Context, db kv.Writer, bk *field.BigInt) (err error)

func WriteTraceTx

func WriteTraceTx(ctx context.Context, db kv.Writer, hash common.Hash, data *types.TraceTx) (err error)

func WriteTraceTx2

func WriteTraceTx2(ctx context.Context, db kv.Writer, hash common.Hash, data *types.TraceTx2) (err error)

func WriteTx

func WriteTx(ctx context.Context, db kv.Writer, hash common.Hash, data *types.Tx) (err error)

table : transactions

/tx/<txhash> => tx info /rt/<txhash> => rt info /all/tx/total => total /all/tx/<index> => <txhash>

func WriteTxIndex

func WriteTxIndex(ctx context.Context, db kv.Writer, index *field.BigInt, hash common.Hash) error

func WriteTxTotal

func WriteTxTotal(ctx context.Context, db kv.Writer, total *field.BigInt) error

func WriteValidateContract

func WriteValidateContract(ctx context.Context, db kv.Writer, address common.Address, data *types.ContractVerity) error

func WriteValidateContractMetadata

func WriteValidateContractMetadata(ctx context.Context, db kv.Writer, data *types.ValidateContractMetadata) error

func WriteValidateContractStatus

func WriteValidateContractStatus(ctx context.Context, db kv.Writer, address common.Address, status *big.Int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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