Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Phase 1]: Tunnel offchain relayer #1

Merged
merged 20 commits into from
Nov 13, 2024
Prev Previous commit
Next Next commit
fix init chain
  • Loading branch information
nkitlabs committed Oct 29, 2024
commit c9c4d16b2ef202312816082aac2207e0eeadd029
8 changes: 7 additions & 1 deletion relayer/chains/evm/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ func NewEVMChainProvider(

// Connect connects to the EVM chain.
func (cp *EVMChainProvider) Init(ctx context.Context) error {
return cp.Client.Connect(ctx)
// TODO: implement loading private key from store

return nil
}

// QueryTunnelInfo queries the tunnel info from the tunnel router contract.
Expand All @@ -66,6 +68,10 @@ func (cp *EVMChainProvider) QueryTunnelInfo(
tunnelID uint64,
tunnelDestinationAddr string,
) (*types.Tunnel, error) {
if err := cp.Client.Connect(ctx); err != nil {
return nil, err
}

addr, err := HexToAddress(tunnelDestinationAddr)
if err != nil {
return nil, err
Expand Down
Loading