Documentation ¶
Index ¶
- type APIResponse
- type Client
- func (c *Client) CheckForFinality(blockHeight *big.Int) (bool, error)
- func (c *Client) EncodeQueryData(depositReceipt DepositReceipt) ([]byte, error)
- func (c *Client) EncodeReportValue(depositReceipt DepositReceipt) ([]byte, error)
- func (c *Client) InitializeDeposits() error
- func (c *Client) QueryAPI(urlStr string) ([]byte, error)
- func (c *Client) QueryCurrentDepositId() (*big.Int, error)
- func (c *Client) QueryDepositDetails(depositId *big.Int) (DepositReceipt, error)
- func (c *Client) QueryTokenBridgeContract() error
- type DepositReceipt
- type DepositReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶
type APIResponse struct { Status string `json:"status"` Data []struct { ExecBlockNumber int `json:"exec_block_number"` } `json:"data"` }
Struct to unmarshal the JSON data
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func StartNewClient ¶
func StartNewClient(ctx context.Context, logger log.Logger, tokenDepositsCache *tokenbridgetypes.DepositReports) *Client
func (*Client) CheckForFinality ¶
func (*Client) EncodeQueryData ¶
func (c *Client) EncodeQueryData(depositReceipt DepositReceipt) ([]byte, error)
func (*Client) EncodeReportValue ¶
func (c *Client) EncodeReportValue(depositReceipt DepositReceipt) ([]byte, error)
replicate solidity encoding, abi.encode(address ethSender, string layerRecipient, uint256 amount)
func (*Client) InitializeDeposits ¶
func (*Client) QueryDepositDetails ¶
func (c *Client) QueryDepositDetails(depositId *big.Int) (DepositReceipt, error)
func (*Client) QueryTokenBridgeContract ¶
type DepositReceipt ¶
type DepositReport ¶
Click to show internal directories.
Click to hide internal directories.