Skip to content

Commit

Permalink
Use framework.DefaultNetwork()
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Jan 10, 2025
1 parent ea35285 commit 1b3fdd6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions deployment/environment/memory/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"path"
"strconv"
"sync"
"testing"
"time"

Expand Down Expand Up @@ -139,12 +140,14 @@ func evmChain(t *testing.T, numUsers int) EVMChain {
}
}

var once = &sync.Once{}

func solChain(t *testing.T) SolanaChain {
t.Helper()

// initialize the docker network used by CTF
// TODO: framework.DefaultNetwork(once) is broken for me, use a static name for now
framework.DefaultNetworkName = "chainlink"
err := framework.DefaultNetwork(once)
require.NoError(t, err)

deployerKey, err := solana.NewRandomPrivateKey()
require.NoError(t, err)
Expand All @@ -160,8 +163,7 @@ func solChain(t *testing.T) SolanaChain {
port := freeport.GetOne(t)

bcInput := &blockchain.Input{
Type: "solana",
// TODO: randomize port
Type: "solana",
ChainID: chainselectors.SOLANA_DEVNET.ChainID,
PublicKey: deployerKey.PublicKey().String(),
Port: strconv.Itoa(port),
Expand Down

0 comments on commit 1b3fdd6

Please sign in to comment.