Documentation
¶
Index ¶
- Variables
- func DecodeBig(num string) *big.Int
- func ParsePage(num *field.BigInt, offset, limit int64) (*field.BigInt, *field.BigInt)
- type Storage
- type StorageImpl
- func (s *StorageImpl) GetErc1155ContractTransfer(ctx context.Context, contract common.Address, offset, limit int64) (data []*types.Erc1155Transfer, total *field.BigInt, err error)
- func (s *StorageImpl) GetErc1155Holder(ctx context.Context, contract common.Address, offset, limit uint64) (holders []*types.Holder, err error)
- func (s *StorageImpl) GetErc1155HolderCount(ctx context.Context, contract common.Address) (count uint64, err error)
- func (s *StorageImpl) GetErc1155Inventory(ctx context.Context, contract common.Address, offset, limit uint64) (inventorys []*field.BigInt, err error)
- func (s *StorageImpl) GetErc1155InventoryCount(ctx context.Context, contract common.Address) (count uint64, err error)
- func (s *StorageImpl) GetErc20ContractTransfer(ctx context.Context, contract common.Address, offset, limit int64) (data []*types.Erc20Transfer, total *field.BigInt, err error)
- func (s *StorageImpl) GetErc20Holder(ctx context.Context, contract common.Address, offset, limit uint64) (holders []*types.Holder, err error)
- func (s *StorageImpl) GetErc20HolderCount(ctx context.Context, contract common.Address) (count uint64, err error)
- func (s *StorageImpl) GetErc721ContractTransfer(ctx context.Context, contract common.Address, offset, limit int64) (data []*types.Erc721Transfer, total *field.BigInt, err error)
- func (s *StorageImpl) GetErc721Holder(ctx context.Context, contract common.Address, offset, limit uint64) (holders []*types.Holder, err error)
- func (s *StorageImpl) GetErc721HolderCount(ctx context.Context, contract common.Address) (count uint64, err error)
- func (s *StorageImpl) GetErc721Inventory(ctx context.Context, contract common.Address, offset, limit uint64) (inventorys []*types.Inventory, err error)
- func (s *StorageImpl) GetErc721InventoryCount(ctx context.Context, contract common.Address) (count uint64, err error)
- func (s *StorageImpl) ReadAccount(ctx context.Context, addr common.Address) (acc *types.Account, err error)
- func (s *StorageImpl) ReadAccountErc1155ByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (data *types.Erc1155Transfer, err error)
- func (s *StorageImpl) ReadAccountErc1155Index(ctx context.Context, addr common.Address, index *field.BigInt) (erc1155TransferIndex *field.BigInt, err error)
- func (s *StorageImpl) ReadAccountErc1155Total(ctx context.Context, addr common.Address) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadAccountErc20ByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (data *types.Erc20Transfer, err error)
- func (s *StorageImpl) ReadAccountErc20Index(ctx context.Context, addr common.Address, index *field.BigInt) (erc20TransferIndex *field.BigInt, err error)
- func (s *StorageImpl) ReadAccountErc20Total(ctx context.Context, addr common.Address) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadAccountErc721ByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (data *types.Erc721Transfer, err error)
- func (s *StorageImpl) ReadAccountErc721Index(ctx context.Context, addr common.Address, index *field.BigInt) (erc721TransferIndex *field.BigInt, err error)
- func (s *StorageImpl) ReadAccountErc721Total(ctx context.Context, addr common.Address) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadAccountITxByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (itx *types.InternalTx, err error)
- func (s *StorageImpl) ReadAccountITxIndex(ctx context.Context, addr common.Address, index *field.BigInt) (data *types.InternalTxKey, err error)
- func (s *StorageImpl) ReadAccountITxTotal(ctx context.Context, addr common.Address) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadAccountTxByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (tx *types.Tx, err error)
- func (s *StorageImpl) ReadAccountTxIndex(ctx context.Context, addr common.Address, index *field.BigInt) (hash common.Hash, err error)
- func (s *StorageImpl) ReadAccountTxTotal(ctx context.Context, addr common.Address) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadBlock(ctx context.Context, blockNum *field.BigInt) (bk *types.Block, err error)
- func (s *StorageImpl) ReadBlockIndex(ctx context.Context, blockNum *field.BigInt, index *field.BigInt) (txHash common.Hash, err error)
- func (s *StorageImpl) ReadBlockTxByIndex(ctx context.Context, blockNum *field.BigInt, index *field.BigInt) (tx *types.Tx, err error)
- func (s *StorageImpl) ReadContract(ctx context.Context, addr common.Address) (acc *types.Contract, err error)
- func (s *StorageImpl) ReadErc1155ContractTotal(ctx context.Context, contract common.Address) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadErc1155ContractTransfer(ctx context.Context, contract common.Address, index *field.BigInt) (data *field.BigInt, err error)
- func (s *StorageImpl) ReadErc1155HolderAmount(ctx context.Context, contract common.Address, addr common.Address) (amount *field.BigInt, err error)
- func (s *StorageImpl) ReadErc1155HolderTokenIdQuantity(ctx context.Context, contract common.Address, addr common.Address, ...) (quantity *field.BigInt, err error)
- func (s *StorageImpl) ReadErc1155Total(ctx context.Context) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadErc1155Transfer(ctx context.Context, index *field.BigInt) (data *types.Erc1155Transfer, err error)
- func (s *StorageImpl) ReadErc20ContractTotal(ctx context.Context, contract common.Address) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadErc20ContractTransfer(ctx context.Context, contract common.Address, index *field.BigInt) (data *field.BigInt, err error)
- func (s *StorageImpl) ReadErc20HolderAmount(ctx context.Context, contract common.Address, addr common.Address) (amount *field.BigInt, err error)
- func (s *StorageImpl) ReadErc20Total(ctx context.Context) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadErc20Transfer(ctx context.Context, index *field.BigInt) (data *types.Erc20Transfer, err error)
- func (s *StorageImpl) ReadErc721ContractTotal(ctx context.Context, contract common.Address) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadErc721ContractTransfer(ctx context.Context, contract common.Address, index *field.BigInt) (data *field.BigInt, err error)
- func (s *StorageImpl) ReadErc721HolderAmount(ctx context.Context, contract common.Address, addr common.Address) (amount *field.BigInt, err error)
- func (s *StorageImpl) ReadErc721HolderTokenIdQuantity(ctx context.Context, contract common.Address, addr common.Address, ...) (quantity *field.BigInt, err error)
- func (s *StorageImpl) ReadErc721Total(ctx context.Context) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadErc721Transfer(ctx context.Context, index *field.BigInt) (data *types.Erc721Transfer, err error)
- func (s *StorageImpl) ReadHome(ctx context.Context) (home *types.Home, err error)
- func (s *StorageImpl) ReadITx(ctx context.Context, hash common.Hash, index *field.BigInt) (data *types.InternalTx, err error)
- func (s *StorageImpl) ReadITxTotal(ctx context.Context, hash common.Hash) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadMethodName(ctx context.Context, methodID, methodName string) (data string, err error)
- func (s *StorageImpl) ReadProxyContract(ctx context.Context, proxy common.Address) (logic common.Address, err error)
- func (s *StorageImpl) ReadRt(ctx context.Context, hash common.Hash) (data *types.Rt, err error)
- func (s *StorageImpl) ReadSyncingBlock(ctx context.Context) (bk *field.BigInt, err error)
- func (s *StorageImpl) ReadTraceTx(ctx context.Context, hash common.Hash) (res *types.TraceTx, err error)
- func (s *StorageImpl) ReadTraceTx2(ctx context.Context, hash common.Hash) (res *types.TraceTx2, err error)
- func (s *StorageImpl) ReadTx(ctx context.Context, hash common.Hash) (data *types.Tx, err error)
- func (s *StorageImpl) ReadTxByIndex(ctx context.Context, index *field.BigInt) (data *types.Tx, err error)
- func (s *StorageImpl) ReadTxTotal(ctx context.Context) (total *field.BigInt, err error)
- func (s *StorageImpl) ReadValidateContract(ctx context.Context, address common.Address) (data *types.ContractVerity, err error)
- func (s *StorageImpl) ReadValidateContractMetadata(ctx context.Context) (acc *types.ValidateContractMetadata, err error)
- func (s *StorageImpl) ReadValidateContractStatus(ctx context.Context, address common.Address) (status *types.ContractStatus, err error)
- func (s *StorageImpl) WriteMethodName(ctx context.Context, methodID, methodName string) error
- func (s *StorageImpl) WriteValidateContract(ctx context.Context, address common.Address, data *types.ContractVerity) error
- func (s *StorageImpl) WriteValidateContractMetadata(ctx context.Context, data *types.ValidateContractMetadata) error
- func (s *StorageImpl) WriteValidateContractStatus(ctx context.Context, address common.Address, status *types.ContractStatus) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ContractVerityPrefix = []byte("contract/info/") ContractVerityTmpPrefix = []byte("contract/tmp/") ContractMethodPrefix = []byte("method/") )
Functions ¶
Types ¶
type Storage ¶
type Storage interface { ReadAccount(ctx context.Context, addr common.Address) (acc *types.Account, err error) ReadAccountTxTotal(ctx context.Context, addr common.Address) (total *field.BigInt, err error) ReadAccountTxIndex(ctx context.Context, addr common.Address, index *field.BigInt) (hash common.Hash, err error) ReadAccountTxByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (tx *types.Tx, err error) ReadAccountITxTotal(ctx context.Context, addr common.Address) (total *field.BigInt, err error) ReadAccountITxIndex(ctx context.Context, addr common.Address, index *field.BigInt) (data *types.InternalTxKey, err error) ReadAccountITxByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (itx *types.InternalTx, err error) ReadAccountErc20Total(ctx context.Context, addr common.Address) (total *field.BigInt, err error) ReadAccountErc20Index(ctx context.Context, addr common.Address, index *field.BigInt) (erc20TransferIndex *field.BigInt, err error) ReadAccountErc20ByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (data *types.Erc20Transfer, err error) ReadAccountErc721Total(ctx context.Context, addr common.Address) (total *field.BigInt, err error) ReadAccountErc721Index(ctx context.Context, addr common.Address, index *field.BigInt) (erc721TransferIndex *field.BigInt, err error) ReadAccountErc721ByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (data *types.Erc721Transfer, err error) ReadAccountErc1155Total(ctx context.Context, addr common.Address) (total *field.BigInt, err error) ReadAccountErc1155Index(ctx context.Context, addr common.Address, index *field.BigInt) (erc1155TransferIndex *field.BigInt, err error) ReadAccountErc1155ByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (data *types.Erc1155Transfer, err error) ReadBlock(ctx context.Context, blockNum *field.BigInt) (bk *types.Block, err error) ReadBlockIndex(ctx context.Context, blockNum *field.BigInt, index *field.BigInt) (txHash common.Hash, err error) ReadBlockTxByIndex(ctx context.Context, blockNum *field.BigInt, index *field.BigInt) (tx *types.Tx, err error) WriteValidateContractMetadata(ctx context.Context, data *types.ValidateContractMetadata) error ReadValidateContractMetadata(ctx context.Context) (acc *types.ValidateContractMetadata, err error) WriteValidateContractStatus(ctx context.Context, address common.Address, status *types.ContractStatus) error ReadValidateContractStatus(ctx context.Context, address common.Address) (status *types.ContractStatus, err error) WriteValidateContract(ctx context.Context, address common.Address, data *types.ContractVerity) error ReadValidateContract(ctx context.Context, address common.Address) (data *types.ContractVerity, err error) WriteMethodName(ctx context.Context, methodID, methodName string) error ReadMethodName(ctx context.Context, methodID, methodName string) (data string, err error) ReadContract(ctx context.Context, addr common.Address) (acc *types.Contract, err error) ReadProxyContract(ctx context.Context, proxy common.Address) (logic common.Address, err error) GetErc20Holder(ctx context.Context, contract common.Address, offset, limit uint64) (holders []*types.Holder, err error) GetErc20HolderCount(ctx context.Context, contract common.Address) (count uint64, err error) ReadErc20HolderAmount(ctx context.Context, contract common.Address, addr common.Address) (amount *field.BigInt, err error) GetErc721Holder(ctx context.Context, contract common.Address, offset, limit uint64) (holders []*types.Holder, err error) GetErc721HolderCount(ctx context.Context, contract common.Address) (count uint64, err error) GetErc721Inventory(ctx context.Context, contract common.Address, offset, limit uint64) (inventorys []*types.Inventory, err error) GetErc721InventoryCount(ctx context.Context, contract common.Address) (count uint64, err error) ReadErc721HolderAmount(ctx context.Context, contract common.Address, addr common.Address) (amount *field.BigInt, err error) ReadErc721HolderTokenIdQuantity(ctx context.Context, contract common.Address, addr common.Address, tokenId *field.BigInt) (quantity *field.BigInt, err error) GetErc1155Inventory(ctx context.Context, contract common.Address, offset, limit uint64) (inventorys []*field.BigInt, err error) GetErc1155InventoryCount(ctx context.Context, contract common.Address) (count uint64, err error) GetErc1155Holder(ctx context.Context, contract common.Address, offset, limit uint64) (holders []*types.Holder, err error) GetErc1155HolderCount(ctx context.Context, contract common.Address) (count uint64, err error) ReadErc1155HolderAmount(ctx context.Context, contract common.Address, addr common.Address) (amount *field.BigInt, err error) ReadErc1155HolderTokenIdQuantity(ctx context.Context, contract common.Address, addr common.Address, tokenId *field.BigInt) (quantity *field.BigInt, err error) ReadHome(ctx context.Context) (home *types.Home, err error) ReadSyncingBlock(ctx context.Context) (bk *field.BigInt, err error) ReadITx(ctx context.Context, hash common.Hash, index *field.BigInt) (data *types.InternalTx, err error) ReadITxTotal(ctx context.Context, hash common.Hash) (total *field.BigInt, err error) ReadTraceTx(ctx context.Context, hash common.Hash) (res *types.TraceTx, err error) ReadTraceTx2(ctx context.Context, hash common.Hash) (res *types.TraceTx2, err error) ReadTx(ctx context.Context, hash common.Hash) (data *types.Tx, err error) ReadTxByIndex(ctx context.Context, index *field.BigInt) (data *types.Tx, err error) ReadTxTotal(ctx context.Context) (total *field.BigInt, err error) ReadRt(ctx context.Context, hash common.Hash) (data *types.Rt, err error) ReadErc20Total(ctx context.Context) (total *field.BigInt, err error) ReadErc721Total(ctx context.Context) (total *field.BigInt, err error) ReadErc1155Total(ctx context.Context) (total *field.BigInt, err error) ReadErc20Transfer(ctx context.Context, index *field.BigInt) (data *types.Erc20Transfer, err error) ReadErc721Transfer(ctx context.Context, index *field.BigInt) (data *types.Erc721Transfer, err error) ReadErc1155Transfer(ctx context.Context, index *field.BigInt) (data *types.Erc1155Transfer, err error) ReadErc20ContractTotal(ctx context.Context, contract common.Address) (total *field.BigInt, err error) ReadErc721ContractTotal(ctx context.Context, contract common.Address) (total *field.BigInt, err error) ReadErc1155ContractTotal(ctx context.Context, contract common.Address) (total *field.BigInt, err error) ReadErc20ContractTransfer(ctx context.Context, contract common.Address, index *field.BigInt) (data *field.BigInt, err error) ReadErc721ContractTransfer(ctx context.Context, contract common.Address, index *field.BigInt) (data *field.BigInt, err error) ReadErc1155ContractTransfer(ctx context.Context, contract common.Address, index *field.BigInt) (data *field.BigInt, err error) GetErc20ContractTransfer(ctx context.Context, contract common.Address, offset, limit int64) (data []*types.Erc20Transfer, total *field.BigInt, err error) GetErc721ContractTransfer(ctx context.Context, contract common.Address, offset, limit int64) (data []*types.Erc721Transfer, total *field.BigInt, err error) GetErc1155ContractTransfer(ctx context.Context, contract common.Address, offset, limit int64) (data []*types.Erc1155Transfer, total *field.BigInt, err error) }
type StorageImpl ¶
func NewStorage ¶
func NewStorage(path string) *StorageImpl
func (*StorageImpl) GetErc1155ContractTransfer ¶
func (*StorageImpl) GetErc1155Holder ¶
func (*StorageImpl) GetErc1155HolderCount ¶
func (*StorageImpl) GetErc1155Inventory ¶
func (*StorageImpl) GetErc1155InventoryCount ¶
func (*StorageImpl) GetErc20ContractTransfer ¶
func (*StorageImpl) GetErc20Holder ¶
func (*StorageImpl) GetErc20HolderCount ¶
func (*StorageImpl) GetErc721ContractTransfer ¶
func (*StorageImpl) GetErc721Holder ¶
func (*StorageImpl) GetErc721HolderCount ¶
func (*StorageImpl) GetErc721Inventory ¶
func (*StorageImpl) GetErc721InventoryCount ¶
func (*StorageImpl) ReadAccount ¶
func (*StorageImpl) ReadAccountErc1155ByIndex ¶
func (s *StorageImpl) ReadAccountErc1155ByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (data *types.Erc1155Transfer, err error)
func (*StorageImpl) ReadAccountErc1155Index ¶
func (*StorageImpl) ReadAccountErc1155Total ¶
func (*StorageImpl) ReadAccountErc20ByIndex ¶
func (s *StorageImpl) ReadAccountErc20ByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (data *types.Erc20Transfer, err error)
func (*StorageImpl) ReadAccountErc20Index ¶
func (*StorageImpl) ReadAccountErc20Total ¶
func (*StorageImpl) ReadAccountErc721ByIndex ¶
func (s *StorageImpl) ReadAccountErc721ByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (data *types.Erc721Transfer, err error)
func (*StorageImpl) ReadAccountErc721Index ¶
func (*StorageImpl) ReadAccountErc721Total ¶
func (*StorageImpl) ReadAccountITxByIndex ¶
func (s *StorageImpl) ReadAccountITxByIndex(ctx context.Context, addr common.Address, index *field.BigInt) (itx *types.InternalTx, err error)
func (*StorageImpl) ReadAccountITxIndex ¶
func (s *StorageImpl) ReadAccountITxIndex(ctx context.Context, addr common.Address, index *field.BigInt) (data *types.InternalTxKey, err error)
func (*StorageImpl) ReadAccountITxTotal ¶
func (*StorageImpl) ReadAccountTxByIndex ¶
func (*StorageImpl) ReadAccountTxIndex ¶
func (*StorageImpl) ReadAccountTxTotal ¶
func (*StorageImpl) ReadBlockIndex ¶
func (*StorageImpl) ReadBlockTxByIndex ¶
func (*StorageImpl) ReadContract ¶
func (*StorageImpl) ReadErc1155ContractTotal ¶
func (*StorageImpl) ReadErc1155ContractTransfer ¶
func (*StorageImpl) ReadErc1155HolderAmount ¶
func (*StorageImpl) ReadErc1155HolderTokenIdQuantity ¶
func (*StorageImpl) ReadErc1155Total ¶
func (*StorageImpl) ReadErc1155Transfer ¶
func (s *StorageImpl) ReadErc1155Transfer(ctx context.Context, index *field.BigInt) (data *types.Erc1155Transfer, err error)
func (*StorageImpl) ReadErc20ContractTotal ¶
func (*StorageImpl) ReadErc20ContractTransfer ¶
func (*StorageImpl) ReadErc20HolderAmount ¶
func (*StorageImpl) ReadErc20Total ¶
func (*StorageImpl) ReadErc20Transfer ¶
func (s *StorageImpl) ReadErc20Transfer(ctx context.Context, index *field.BigInt) (data *types.Erc20Transfer, err error)
func (*StorageImpl) ReadErc721ContractTotal ¶
func (*StorageImpl) ReadErc721ContractTransfer ¶
func (*StorageImpl) ReadErc721HolderAmount ¶
func (*StorageImpl) ReadErc721HolderTokenIdQuantity ¶
func (*StorageImpl) ReadErc721Total ¶
func (*StorageImpl) ReadErc721Transfer ¶
func (s *StorageImpl) ReadErc721Transfer(ctx context.Context, index *field.BigInt) (data *types.Erc721Transfer, err error)
func (*StorageImpl) ReadITx ¶
func (s *StorageImpl) ReadITx(ctx context.Context, hash common.Hash, index *field.BigInt) (data *types.InternalTx, err error)
func (*StorageImpl) ReadITxTotal ¶
func (*StorageImpl) ReadMethodName ¶
func (*StorageImpl) ReadProxyContract ¶
func (*StorageImpl) ReadSyncingBlock ¶
func (*StorageImpl) ReadTraceTx ¶
func (*StorageImpl) ReadTraceTx2 ¶
func (*StorageImpl) ReadTxByIndex ¶
func (*StorageImpl) ReadTxTotal ¶
func (*StorageImpl) ReadValidateContract ¶
func (s *StorageImpl) ReadValidateContract(ctx context.Context, address common.Address) (data *types.ContractVerity, err error)
func (*StorageImpl) ReadValidateContractMetadata ¶
func (s *StorageImpl) ReadValidateContractMetadata(ctx context.Context) (acc *types.ValidateContractMetadata, err error)
func (*StorageImpl) ReadValidateContractStatus ¶
func (s *StorageImpl) ReadValidateContractStatus(ctx context.Context, address common.Address) (status *types.ContractStatus, err error)
func (*StorageImpl) WriteMethodName ¶
func (s *StorageImpl) WriteMethodName(ctx context.Context, methodID, methodName string) error
func (*StorageImpl) WriteValidateContract ¶
func (s *StorageImpl) WriteValidateContract(ctx context.Context, address common.Address, data *types.ContractVerity) error
func (*StorageImpl) WriteValidateContractMetadata ¶
func (s *StorageImpl) WriteValidateContractMetadata(ctx context.Context, data *types.ValidateContractMetadata) error
func (*StorageImpl) WriteValidateContractStatus ¶
func (s *StorageImpl) WriteValidateContractStatus(ctx context.Context, address common.Address, status *types.ContractStatus) error
Click to show internal directories.
Click to hide internal directories.