Skip to content

Commit 013c8ab

Browse files
committed
welp
cleaning up branch
1 parent 1228982 commit 013c8ab

File tree

5 files changed

+1
-115
lines changed

5 files changed

+1
-115
lines changed

.github/actions/setup-solana/build-contracts/action.yml

-1
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,3 @@ runs:
6868
run: |
6969
mkdir -p /home/runner/work/chainlink/chainlink/deployment/ccip/changeset/internal/solana_contracts
7070
cp chainlink-ccip/chains/solana/contracts/target/deploy/*.so /home/runner/work/chainlink/chainlink/deployment/ccip/changeset/internal/solana_contracts
71-
echo ${{ env.CHAINLINK_CCIP_COMMIT_SHORT }} > /home/runner/work/chainlink/chainlink/deployment/ccip/changeset/internal/solana_contracts/.solana_contracts_rev

deployment/ccip/changeset/cs_deploy_chain_test.go

-67
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@ package changeset
33
import (
44
"encoding/json"
55
"fmt"
6-
"os"
7-
"strings"
86
"testing"
97

108
"github.com/stretchr/testify/require"
119
"go.uber.org/zap/zapcore"
12-
"golang.org/x/mod/modfile"
13-
"golang.org/x/mod/module"
1410

1511
"github.com/smartcontractkit/chainlink/deployment"
1612
commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset"
@@ -20,69 +16,6 @@ import (
2016
"github.com/smartcontractkit/chainlink/v2/core/logger"
2117
)
2218

23-
func init() {
24-
AssertAllContractsArePresent()
25-
}
26-
27-
func AssertAllContractsArePresent() {
28-
// list all contracts we'll expect to have
29-
expectedContracts := []string{
30-
"ccip_router.so",
31-
}
32-
33-
// check if all contracts are present in the correct path
34-
programsPath := memory.GetProgramsPath()
35-
36-
// check if all contracts are present
37-
for _, contract := range expectedContracts {
38-
contractPath := fmt.Sprintf("%s/%s", programsPath, contract)
39-
40-
_, err := os.Stat(contractPath)
41-
42-
if err != nil {
43-
panic(fmt.Sprintf("Contract %s not found in %s. Please run script TODO to populate them", contract, contractPath))
44-
}
45-
}
46-
47-
// read current version of contracts and compare with expected
48-
currentContractsRevision, err := os.ReadFile(programsPath + "/.solana_contracts_rev")
49-
currentContractsRevision = []byte(strings.TrimSpace(string(currentContractsRevision)))
50-
if err != nil {
51-
panic(fmt.Sprintf("Could not read .solana_contracts_rev file: %v", err))
52-
}
53-
54-
gomodContent, err := os.ReadFile("../../../deployment/go.mod")
55-
if err != nil {
56-
panic(fmt.Sprintf("Could not read deployment/go.mod file: %v", err))
57-
}
58-
59-
modfile, err := modfile.Parse("deployment/go.mod", gomodContent, nil)
60-
if err != nil {
61-
panic(fmt.Sprintf("Could not parse deployment/go.mod file: %v", err))
62-
}
63-
64-
var solanaModVersion string = ""
65-
for _, r := range modfile.Require {
66-
if r.Mod.Path == "github.com/smartcontractkit/chainlink-ccip/chains/solana" {
67-
solanaModVersion = r.Mod.Version
68-
break
69-
}
70-
}
71-
if solanaModVersion == "" {
72-
panic("Could not find ccip solana module in deployment/go.mod")
73-
}
74-
75-
solanaModVersionRev, err := module.PseudoVersionRev(solanaModVersion)
76-
77-
if err != nil {
78-
panic(fmt.Sprintf("Could not parse ccip solana module version: %v", err))
79-
}
80-
81-
if string(currentContractsRevision) != solanaModVersionRev {
82-
panic(fmt.Sprintf("solana_contracts_rev file is outdated. Please run script TODO to update it"))
83-
}
84-
}
85-
8619
func TestDeployChainContractsChangeset(t *testing.T) {
8720
t.Parallel()
8821
lggr := logger.TestLogger(t)

deployment/ccip/changeset/internal/.gitignore

-2
This file was deleted.

deployment/ccip/changeset/internal/build_solana_contracts.sh

-45
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8973fd0c912b

0 commit comments

Comments
 (0)