Skip to content

Commit

Permalink
BCF-2684: rm core/chains/solana; use chainlink-solana/pkg/solana (#10860
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jmank88 authored Oct 16, 2023
1 parent 873aa6b commit 6dc18cb
Show file tree
Hide file tree
Showing 37 changed files with 122 additions and 1,853 deletions.
11 changes: 5 additions & 6 deletions core/chains/cosmos/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ import (
"github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db"
"github.com/smartcontractkit/chainlink/v2/core/services"

relaychains "github.com/smartcontractkit/chainlink-relay/pkg/chains"
"github.com/smartcontractkit/chainlink-relay/pkg/logger"
"github.com/smartcontractkit/chainlink-relay/pkg/loop"
relaytypes "github.com/smartcontractkit/chainlink-relay/pkg/types"

"github.com/smartcontractkit/chainlink/v2/core/chains"
"github.com/smartcontractkit/chainlink/v2/core/chains/cosmos/cosmostxm"
"github.com/smartcontractkit/chainlink/v2/core/chains/internal"
"github.com/smartcontractkit/chainlink/v2/core/services/pg"
"github.com/smartcontractkit/chainlink/v2/core/services/relay"
"github.com/smartcontractkit/chainlink/v2/core/utils"
)

Expand Down Expand Up @@ -132,8 +131,8 @@ func (c *chain) ID() string {
return c.id
}

func (c *chain) ChainID() relay.ChainID {
return relay.ChainID(c.id)
func (c *chain) ChainID() string {
return c.id
}

func (c *chain) Config() coscfg.Config {
Expand Down Expand Up @@ -223,7 +222,7 @@ func (c *chain) GetChainStatus(ctx context.Context) (relaytypes.ChainStatus, err
}, nil
}
func (c *chain) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []relaytypes.NodeStatus, nextPageToken string, total int, err error) {
return internal.ListNodeStatuses(int(pageSize), pageToken, c.listNodeStatuses)
return relaychains.ListNodeStatuses(int(pageSize), pageToken, c.listNodeStatuses)
}

func (c *chain) Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error {
Expand All @@ -235,7 +234,7 @@ func (c *chain) listNodeStatuses(start, end int) ([]relaytypes.NodeStatus, int,
stats := make([]relaytypes.NodeStatus, 0)
total := len(c.cfg.Nodes)
if start >= total {
return stats, total, internal.ErrOutOfRange
return stats, total, relaychains.ErrOutOfRange
}
if end > total {
end = total
Expand Down
9 changes: 4 additions & 5 deletions core/chains/evm/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"net/url"
"time"

gotoml "github.com/pelletier/go-toml/v2"
"go.uber.org/multierr"

"github.com/smartcontractkit/sqlx"

gotoml "github.com/pelletier/go-toml/v2"

relaychains "github.com/smartcontractkit/chainlink-relay/pkg/chains"
"github.com/smartcontractkit/chainlink-relay/pkg/types"

"github.com/smartcontractkit/chainlink/v2/core/chains"
Expand All @@ -29,7 +29,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/monitor"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr"
evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types"
"github.com/smartcontractkit/chainlink/v2/core/chains/internal"
"github.com/smartcontractkit/chainlink/v2/core/config"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services"
Expand Down Expand Up @@ -422,7 +421,7 @@ func (c *chain) listNodeStatuses(start, end int) ([]types.NodeStatus, int, error
nodes := c.cfg.Nodes()
total := len(nodes)
if start >= total {
return nil, total, internal.ErrOutOfRange
return nil, total, relaychains.ErrOutOfRange
}
if end > total {
end = total
Expand Down Expand Up @@ -459,7 +458,7 @@ func (c *chain) listNodeStatuses(start, end int) ([]types.NodeStatus, int, error
}

func (c *chain) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []types.NodeStatus, nextPageToken string, total int, err error) {
return internal.ListNodeStatuses(int(pageSize), pageToken, c.listNodeStatuses)
return relaychains.ListNodeStatuses(int(pageSize), pageToken, c.listNodeStatuses)
}

func (c *chain) ID() *big.Int { return c.id }
Expand Down
109 changes: 0 additions & 109 deletions core/chains/internal/utils.go

This file was deleted.

166 changes: 0 additions & 166 deletions core/chains/internal/utils_test.go

This file was deleted.

Loading

0 comments on commit 6dc18cb

Please sign in to comment.