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 ¶
- Variables
- func DelErc1155HolderAmount(ctx context.Context, db kv.Sorter, contract common.Address, ...) (err error)
- func DelErc20HolderAmount(ctx context.Context, db kv.Sorter, contract common.Address, ...) (err error)
- func DelErc721HolderAmount(ctx context.Context, db kv.Sorter, contract common.Address, ...) (err error)
- func GetErc1155Holder(ctx context.Context, db kv.Sorter, contract common.Address, ...) (holders []*types.Holder, err error)
- func GetErc1155HolderCount(ctx context.Context, db kv.Sorter, contract common.Address) (count uint64, err error)
- func GetErc1155Inventory(ctx context.Context, db kv.Sorter, contract common.Address, ...) (inventorys []*field.BigInt, err error)
- func GetErc1155InventoryCount(ctx context.Context, db kv.Sorter, contract common.Address) (count uint64, err error)
- func GetErc20Holder(ctx context.Context, db kv.Sorter, contract common.Address, ...) (holders []*types.Holder, err error)
- func GetErc20HolderCount(ctx context.Context, db kv.Sorter, contract common.Address) (count uint64, err error)
- func GetErc721Holder(ctx context.Context, db kv.Sorter, contract common.Address, ...) (holders []*types.Holder, err error)
- func GetErc721HolderCount(ctx context.Context, db kv.Sorter, contract common.Address) (count uint64, err error)
- func GetErc721Inventory(ctx context.Context, db kv.Sorter, contract common.Address, ...) (inventorys []*types.Inventory, err error)
- func GetErc721InventoryCount(ctx context.Context, db kv.Sorter, contract common.Address) (count uint64, err error)
- func GetITxKey(hash common.Hash, index *field.BigInt) []byte
- func GetITxTotalKey(hash common.Hash) []byte
- func ReadAccount(ctx context.Context, db kv.Reader, addr common.Address) (acc *types.Account, err error)
- func ReadAccountErc1155ByIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (data *types.Erc1155Transfer, err error)
- func ReadAccountErc1155Index(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (erc1155TransferIndex *field.BigInt, err error)
- func ReadAccountErc1155Total(ctx context.Context, db kv.Reader, addr common.Address) (total *field.BigInt, err error)
- func ReadAccountErc20ByIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (data *types.Erc20Transfer, err error)
- func ReadAccountErc20Index(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (erc20TransferIndex *field.BigInt, err error)
- func ReadAccountErc20Total(ctx context.Context, db kv.Reader, addr common.Address) (total *field.BigInt, err error)
- func ReadAccountErc721ByIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (data *types.Erc721Transfer, err error)
- func ReadAccountErc721Index(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (erc721TransferIndex *field.BigInt, err error)
- func ReadAccountErc721Total(ctx context.Context, db kv.Reader, addr common.Address) (total *field.BigInt, err error)
- func ReadAccountITxByIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (itx *types.InternalTx, err error)
- func ReadAccountITxIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (data *types.InternalTxKey, err error)
- func ReadAccountITxTotal(ctx context.Context, db kv.Reader, addr common.Address) (total *field.BigInt, err error)
- func ReadAccountTxByIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (tx *types.Tx, err error)
- func ReadAccountTxIndex(ctx context.Context, db kv.Reader, addr common.Address, index *field.BigInt) (hash common.Hash, err error)
- func ReadAccountTxTotal(ctx context.Context, db kv.Reader, addr common.Address) (total *field.BigInt, err error)
- func ReadBlock(ctx context.Context, db kv.Reader, blockNum *field.BigInt) (bk *types.Block, err error)
- func ReadBlockIndex(ctx context.Context, db kv.Reader, blockNum *field.BigInt, index *field.BigInt) (txHash common.Hash, err error)
- func ReadBlockTxByIndex(ctx context.Context, db kv.Reader, blockNum *field.BigInt, index *field.BigInt) (tx *types.Tx, err error)
- func ReadContract(ctx context.Context, db kv.Reader, addr common.Address) (acc *types.Contract, err error)
- func ReadErc1155ContractTotal(ctx context.Context, db kv.Reader, contract common.Address) (total *field.BigInt, err error)
- func ReadErc1155ContractTransfer(ctx context.Context, db kv.Reader, contract common.Address, ...) (data *field.BigInt, err error)
- func ReadErc1155HolderAmount(ctx context.Context, db kv.Reader, contract common.Address, ...) (amount *field.BigInt, err error)
- func ReadErc1155HolderTokenIdQuantity(ctx context.Context, db kv.Reader, contract common.Address, ...) (quantity *field.BigInt, err error)
- func ReadErc1155Total(ctx context.Context, db kv.Reader) (total *field.BigInt, err error)
- func ReadErc1155Transfer(ctx context.Context, db kv.Reader, index *field.BigInt) (data *types.Erc1155Transfer, err error)
- func ReadErc20ContractTotal(ctx context.Context, db kv.Reader, contract common.Address) (total *field.BigInt, err error)
- func ReadErc20ContractTransfer(ctx context.Context, db kv.Reader, contract common.Address, ...) (data *field.BigInt, err error)
- func ReadErc20HolderAmount(ctx context.Context, db kv.Reader, contract common.Address, ...) (amount *field.BigInt, err error)
- func ReadErc20Total(ctx context.Context, db kv.Reader) (total *field.BigInt, err error)
- func ReadErc20Transfer(ctx context.Context, db kv.Reader, index *field.BigInt) (data *types.Erc20Transfer, err error)
- func ReadErc721ContractTotal(ctx context.Context, db kv.Reader, contract common.Address) (total *field.BigInt, err error)
- func ReadErc721ContractTransfer(ctx context.Context, db kv.Reader, contract common.Address, ...) (data *field.BigInt, err error)
- func ReadErc721HolderAmount(ctx context.Context, db kv.Reader, contract common.Address, ...) (amount *field.BigInt, err error)
- func ReadErc721HolderTokenIdQuantity(ctx context.Context, db kv.Reader, contract common.Address, ...) (quantity *field.BigInt, err error)
- func ReadErc721Total(ctx context.Context, db kv.Reader) (total *field.BigInt, err error)
- func ReadErc721Transfer(ctx context.Context, db kv.Reader, index *field.BigInt) (data *types.Erc721Transfer, err error)
- func ReadHome(ctx context.Context, db kv.Reader) (home *types.Home, err error)
- func ReadITx(ctx context.Context, db kv.Reader, hash common.Hash, index *field.BigInt) (data *types.InternalTx, err error)
- func ReadITxTotal(ctx context.Context, db kv.Reader, hash common.Hash) (total *field.BigInt, err error)
- func ReadMethodName(ctx context.Context, db kv.Reader, methodID string) (data string, err error)
- func ReadProxyContract(ctx context.Context, db kv.Reader, proxy common.Address) (logic common.Address, err error)
- func ReadRt(ctx context.Context, db kv.Reader, hash common.Hash) (data *types.Rt, err error)
- func ReadSyncingBlock(ctx context.Context, db kv.Reader) (bk *field.BigInt, err error)
- func ReadTraceTx(ctx context.Context, db kv.Reader, hash common.Hash) (res *types.TraceTx, err error)
- func ReadTraceTx2(ctx context.Context, db kv.Reader, hash common.Hash) (res *types.TraceTx2, err error)
- func ReadTx(ctx context.Context, db kv.Reader, hash common.Hash) (data *types.Tx, err error)
- func ReadTxByIndex(ctx context.Context, db kv.Reader, index *field.BigInt) (data *types.Tx, err error)
- func ReadTxTotal(ctx context.Context, db kv.Reader) (total *field.BigInt, err error)
- func ReadValidateContract(ctx context.Context, db kv.Reader, address common.Address) (data *types.ContractVerity, err error)
- func ReadValidateContractMetadata(ctx context.Context, db kv.Reader) (acc *types.ValidateContractMetadata, err error)
- func ReadValidateContractStatus(ctx context.Context, db kv.Reader, address common.Address) (status *big.Int, err error)
- func WriteAccount(ctx context.Context, db kv.Database, addr common.Address, acc *types.Account) error
- func WriteAccountErc1155Index(ctx context.Context, db kv.Writer, addr common.Address, index *field.BigInt, ...) (err error)
- func WriteAccountErc1155Total(ctx context.Context, db kv.Writer, addr common.Address, total *field.BigInt) (err error)
- func WriteAccountErc20Index(ctx context.Context, db kv.Writer, addr common.Address, index *field.BigInt, ...) (err error)
- func WriteAccountErc20Total(ctx context.Context, db kv.Writer, addr common.Address, total *field.BigInt) (err error)
- func WriteAccountErc721Index(ctx context.Context, db kv.Writer, addr common.Address, index *field.BigInt, ...) (err error)
- func WriteAccountErc721Total(ctx context.Context, db kv.Writer, addr common.Address, total *field.BigInt) (err error)
- func WriteAccountITxIndex(ctx context.Context, db kv.Writer, addr common.Address, index *field.BigInt, ...) (err error)
- func WriteAccountITxTotal(ctx context.Context, db kv.Writer, addr common.Address, total *field.BigInt) (err error)
- func WriteAccountTxIndex(ctx context.Context, db kv.Writer, addr common.Address, index *field.BigInt, ...) error
- func WriteAccountTxTotal(ctx context.Context, db kv.Writer, addr common.Address, total *field.BigInt) (err error)
- func WriteBlock(ctx context.Context, db kv.Writer, blockNum *field.BigInt, bk *types.Block) (err error)
- func WriteBlockIndex(ctx context.Context, db kv.Writer, blockNum *field.BigInt, index *field.BigInt, ...) (err error)
- func WriteContract(ctx context.Context, db kv.Writer, addr common.Address, data *types.Contract) error
- func WriteErc1155ContractTotal(ctx context.Context, db kv.Writer, contract common.Address, ...) error
- func WriteErc1155ContractTransfer(ctx context.Context, db kv.Writer, contract common.Address, ...) (err error)
- func WriteErc1155HolderAmount(ctx context.Context, db kv.Database, contract common.Address, ...) (err error)
- func WriteErc1155HolderTokenIdQuantity(ctx context.Context, db kv.Database, contract common.Address, ...) (err error)
- func WriteErc1155Total(ctx context.Context, db kv.Writer, total *field.BigInt) error
- func WriteErc1155Transfer(ctx context.Context, db kv.Writer, index *field.BigInt, ...) (err error)
- func WriteErc20ContractTotal(ctx context.Context, db kv.Writer, contract common.Address, ...) error
- func WriteErc20ContractTransfer(ctx context.Context, db kv.Writer, contract common.Address, ...) (err error)
- func WriteErc20HolderAmount(ctx context.Context, db kv.Database, contract common.Address, ...) (err error)
- func WriteErc20Total(ctx context.Context, db kv.Writer, total *field.BigInt) error
- func WriteErc20Transfer(ctx context.Context, db kv.Writer, index *field.BigInt, ...) (err error)
- func WriteErc721ContractTotal(ctx context.Context, db kv.Writer, contract common.Address, ...) error
- func WriteErc721ContractTransfer(ctx context.Context, db kv.Writer, contract common.Address, ...) (err error)
- func WriteErc721HolderAmount(ctx context.Context, db kv.Database, contract common.Address, ...) (err error)
- func WriteErc721HolderTokenIdQuantity(ctx context.Context, db kv.Database, contract common.Address, ...) (err error)
- func WriteErc721Total(ctx context.Context, db kv.Writer, total *field.BigInt) error
- func WriteErc721Transfer(ctx context.Context, db kv.Writer, index *field.BigInt, ...) (err error)
- func WriteHome(ctx context.Context, db kv.Writer, home *types.Home) (err error)
- func WriteITx(ctx context.Context, db kv.Writer, hash common.Hash, index *field.BigInt, ...) (err error)
- func WriteItxTotal(ctx context.Context, db kv.Writer, hash common.Hash, total *field.BigInt) (err error)
- func WriteMethodName(ctx context.Context, db kv.Writer, methodID, methodName string) error
- func WriteProxyContract(ctx context.Context, db kv.Writer, proxy common.Address, logic common.Address) error
- func WriteRt(ctx context.Context, db kv.Writer, hash common.Hash, data *types.Rt) (err error)
- func WriteSyncingBlock(ctx context.Context, db kv.Writer, bk *field.BigInt) (err error)
- func WriteTraceTx(ctx context.Context, db kv.Writer, hash common.Hash, data *types.TraceTx) (err error)
- func WriteTraceTx2(ctx context.Context, db kv.Writer, hash common.Hash, data *types.TraceTx2) (err error)
- func WriteTx(ctx context.Context, db kv.Writer, hash common.Hash, data *types.Tx) (err error)
- func WriteTxIndex(ctx context.Context, db kv.Writer, index *field.BigInt, hash common.Hash) error
- func WriteTxTotal(ctx context.Context, db kv.Writer, total *field.BigInt) error
- func WriteValidateContract(ctx context.Context, db kv.Writer, address common.Address, ...) error
- func WriteValidateContractMetadata(ctx context.Context, db kv.Writer, data *types.ValidateContractMetadata) error
- func WriteValidateContractStatus(ctx context.Context, db kv.Writer, address common.Address, status *big.Int) error
Constants ¶
This section is empty.
Variables ¶
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 GetErc1155HolderCount ¶
func GetErc1155Inventory ¶
func GetErc20Holder ¶
func GetErc20HolderCount ¶
func GetErc721Holder ¶
func GetErc721HolderCount ¶
func GetErc721Inventory ¶
func GetErc721InventoryCount ¶
func GetITxTotalKey ¶
func ReadAccount ¶
func ReadAccount(ctx context.Context, db kv.Reader, addr common.Address) (acc *types.Account, err error)
----------------- account info -----------------
func ReadAccountErc1155Index ¶
func ReadAccountErc1155Total ¶
func ReadAccountErc20ByIndex ¶
func ReadAccountErc20Index ¶
func ReadAccountErc20Total ¶
func ReadAccountErc721Index ¶
func ReadAccountErc721Total ¶
func ReadAccountITxByIndex ¶
func ReadAccountITxIndex ¶
func ReadAccountITxTotal ¶
func ReadAccountTxByIndex ¶
func ReadAccountTxIndex ¶
func ReadAccountTxTotal ¶
func ReadBlockIndex ¶
func ReadBlockTxByIndex ¶
func ReadContract ¶
func ReadContract(ctx context.Context, db kv.Reader, addr common.Address) (acc *types.Contract, err error)
----------------- contract info -----------------
func ReadErc1155HolderAmount ¶
func ReadErc1155Total ¶
func ReadErc1155Transfer ¶
func ReadErc20ContractTotal ¶
func ReadErc20HolderAmount ¶
func ReadErc20Total ¶
func ReadErc20Transfer ¶
func ReadErc721ContractTotal ¶
func ReadErc721HolderAmount ¶
func ReadErc721Total ¶
func ReadErc721Transfer ¶
func ReadITxTotal ¶
func ReadMethodName ¶
func ReadProxyContract ¶
func ReadSyncingBlock ¶
func ReadTraceTx ¶
func ReadTraceTx2 ¶
func ReadTxByIndex ¶
func ReadTxTotal ¶
func ReadValidateContract ¶
func WriteAccount ¶
func WriteAccountErc20Index ¶
func WriteAccountErc20Total ¶
func WriteAccountErc721Index ¶
func WriteAccountErc721Total ¶
func WriteAccountITxIndex ¶
func WriteAccountITxTotal ¶
func WriteAccountTxIndex ¶
func WriteAccountTxTotal ¶
func WriteBlock ¶
func WriteBlockIndex ¶
func WriteContract ¶
func WriteErc1155Total ¶
func WriteErc1155Transfer ¶
func WriteErc20ContractTotal ¶
func WriteErc20HolderAmount ¶
func WriteErc20Total ¶
func WriteErc20Transfer ¶
func WriteErc721HolderAmount ¶
func WriteErc721Total ¶
func WriteErc721Transfer ¶
func WriteItxTotal ¶
func WriteMethodName ¶
func WriteProxyContract ¶
func WriteProxyContract(ctx context.Context, db kv.Writer, proxy common.Address, logic common.Address) error
-------------------- proxy contract -------------
func WriteSyncingBlock ¶
func WriteTraceTx ¶
func WriteTraceTx2 ¶
func WriteTx ¶
table : transactions
/tx/<txhash> => tx info /rt/<txhash> => rt info /all/tx/total => total /all/tx/<index> => <txhash>
func WriteTxIndex ¶
func WriteValidateContract ¶
Types ¶
This section is empty.