Documentation
¶
Index ¶
- type Reader
- type ReaderClient
- func (c *ReaderClient) BaseClient() sdk.CombinedClient
- func (c *ReaderClient) CallContract(contractAddress address.Address, method string, params []any) (map[string]interface{}, error)
- func (c *ReaderClient) CallContractFullNode(contractAddress address.Address, method string, params []any) (map[string]interface{}, error)
- func (c *ReaderClient) GetEventsFromBlock(contractAddress address.Address, eventName string, blockNum uint64) ([]map[string]interface{}, error)
- func (c *ReaderClient) LatestBlockHeight() (uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader interface {
CallContract(contractAddress address.Address, method string, params []any) (map[string]interface{}, error)
CallContractFullNode(contractAddress address.Address, method string, params []any) (map[string]interface{}, error)
LatestBlockHeight() (uint64, error)
GetEventsFromBlock(contractAddress address.Address, eventName string, blockNum uint64) ([]map[string]interface{}, error)
BaseClient() sdk.CombinedClient
}
type ReaderClient ¶
type ReaderClient struct {
// contains filtered or unexported fields
}
func NewReader ¶
func NewReader(rpc sdk.CombinedClient, lggr logger.Logger) *ReaderClient
func (*ReaderClient) BaseClient ¶
func (c *ReaderClient) BaseClient() sdk.CombinedClient
func (*ReaderClient) CallContract ¶
func (*ReaderClient) CallContractFullNode ¶
func (c *ReaderClient) CallContractFullNode(contractAddress address.Address, method string, params []any) (map[string]interface{}, error)
Same as CallContract, but uses the fullnode client instead of the solidity client, which means it uses the non-finalized state of the chain.
func (*ReaderClient) GetEventsFromBlock ¶
func (*ReaderClient) LatestBlockHeight ¶
func (c *ReaderClient) LatestBlockHeight() (uint64, error)
Click to show internal directories.
Click to hide internal directories.