Documentation ¶
Index ¶
- type EthClient
- func (c *EthClient) SendTransaction(ctx context.Context, toStr, valueStr, dataStr string, op *optypes.SyncOperator) (*ethtypes.Transaction, error)
- func (c *EthClient) TransactionByHash(ctx context.Context, hash string) (any, error)
- func (c *EthClient) TransactionState(ctx context.Context, hash string) (enums.TransactionState, error)
- type ZKSyncClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EthClient ¶
type EthClient struct {
// contains filtered or unexported fields
}
EthClient is a client for ethereum compatible chain
func NewEthClient ¶
NewEthClient creates a new EthClient
func (*EthClient) SendTransaction ¶
func (c *EthClient) SendTransaction(ctx context.Context, toStr, valueStr, dataStr string, op *optypes.SyncOperator) (*ethtypes.Transaction, error)
SendTransaction sends transaction
func (*EthClient) TransactionByHash ¶
TransactionByHash returns transaction by hash
func (*EthClient) TransactionState ¶
func (c *EthClient) TransactionState(ctx context.Context, hash string) (enums.TransactionState, error)
TransactionState returns transaction state TODO: refactor to reduce duplicate code with other chain clients (e.g. zksync.go)
type ZKSyncClient ¶
type ZKSyncClient struct {
*EthClient
}
ZKSyncClient is a client for zksync chain
func NewZKSyncClient ¶
func NewZKSyncClient(endpoint string) *ZKSyncClient
NewZKSyncClient creates a new ZKSyncClient
func (*ZKSyncClient) TransactionByHash ¶
TransactionByHash returns transaction by hash
func (*ZKSyncClient) TransactionState ¶
func (c *ZKSyncClient) TransactionState(ctx context.Context, hash string) (enums.TransactionState, error)
TransactionState returns transaction state
Click to show internal directories.
Click to hide internal directories.