Skip to content

Commit

Permalink
Use randomized port for solana validator
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Jan 8, 2025
1 parent 95d24a5 commit 5b0fd2d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deployment/environment/memory/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import (
"github.com/ethereum/go-ethereum/ethclient/simulated"
"github.com/gagliardetto/solana-go"
solRpc "github.com/gagliardetto/solana-go/rpc"
"github.com/hashicorp/consul/sdk/freeport"
"github.com/stretchr/testify/require"

chainsel "github.com/smartcontractkit/chain-selectors"

"github.com/smartcontractkit/chainlink-common/pkg/utils"
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"

chainselectors "github.com/smartcontractkit/chain-selectors"
Expand Down Expand Up @@ -115,11 +117,14 @@ func solChain(t *testing.T) SolChain {
require.NoError(t, err)
// TODO: fund this key

port := freeport.GetOne(t)

bcInput := &blockchain.Input{
Type: "solana",
// TODO: randomize port
ChainID: chainselectors.SOLANA_DEVNET.ChainID,
PublicKey: deployerKey.PublicKey().String(),
Port: port,
// TODO: ContractsDir & SolanaPrograms via env vars
}
output, err := blockchain.NewBlockchainNetwork(bcInput)
Expand Down

0 comments on commit 5b0fd2d

Please sign in to comment.