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

BCF-2684: rm core/chains/solana; use chainlink-solana/pkg/solana #10860

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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