Documentation ¶
Index ¶
- func AddressEncodeDecoder(chain multichain.Chain, network multichain.Network) multichain.AddressEncodeDecoder
- func NetParams(chain multichain.Chain, net multichain.Network) *chaincfg.Params
- func ZcashNetParams(network multichain.Network) *zcash.Params
- type BlockHeightFetcher
- type BurnInfo
- type BurnLogFetcher
- type BurnLogResult
- type EthBlockHeightFetcher
- type EthBurnLogFetcher
- type SolFetcher
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressEncodeDecoder ¶
func AddressEncodeDecoder(chain multichain.Chain, network multichain.Network) multichain.AddressEncodeDecoder
func NetParams ¶
func NetParams(chain multichain.Chain, net multichain.Network) *chaincfg.Params
func ZcashNetParams ¶
func ZcashNetParams(network multichain.Network) *zcash.Params
Types ¶
type BlockHeightFetcher ¶
type BurnLogFetcher ¶
type BurnLogResult ¶
type EthBlockHeightFetcher ¶
type EthBlockHeightFetcher struct {
// contains filtered or unexported fields
}
func NewEthBlockHeightFetcher ¶
func NewEthBlockHeightFetcher(ethClient *ethclient.Client) EthBlockHeightFetcher
func (EthBlockHeightFetcher) FetchBlockHeight ¶
func (fetcher EthBlockHeightFetcher) FetchBlockHeight(ctx context.Context) (uint64, error)
currentBlockNumber returns the current block number for the chain being watched
type EthBurnLogFetcher ¶
type EthBurnLogFetcher struct {
// contains filtered or unexported fields
}
func NewEthBurnLogFetcher ¶
func NewEthBurnLogFetcher(bindings *gatewaybinding.MintGatewayLogicV1) EthBurnLogFetcher
func (EthBurnLogFetcher) FetchBurnLogs ¶
func (fetcher EthBurnLogFetcher) FetchBurnLogs(ctx context.Context, from uint64, to uint64) (chan BurnLogResult, error)
This will fetch the burn event logs using the ethereum bindings and emit them via a channel We do this so that we can unit test the log handling without calling ethereum
type SolFetcher ¶
type SolFetcher struct {
// contains filtered or unexported fields
}
func NewSolFetcher ¶
func NewSolFetcher(client *solanaRPC.Client, gatewayAddress string) SolFetcher
func (SolFetcher) FetchBlockHeight ¶
func (fetcher SolFetcher) FetchBlockHeight(ctx context.Context) (uint64, error)
Behaves differently, as it checks the maximum burn index that should be fetched
func (SolFetcher) FetchBurnLogs ¶
func (fetcher SolFetcher) FetchBurnLogs(ctx context.Context, from uint64, to uint64) (chan BurnLogResult, error)
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher watches for event logs for burn transactions. These transactions are then forwarded to the cacher.
func NewWatcher ¶
func NewWatcher(logger logrus.FieldLogger, network multichain.Network, selector tx.Selector, bindings binding.Bindings, burnLogFetcher BurnLogFetcher, blockHeightFetcher BlockHeightFetcher, resolver jsonrpc.Resolver, cache redis.Cmdable, pollInterval time.Duration, maxBlockAdvance uint64, confidenceInterval uint64) Watcher
NewWatcher returns a new Watcher.
Click to show internal directories.
Click to hide internal directories.