-
Notifications
You must be signed in to change notification settings - Fork 16
solana connect chains #1289
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
solana connect chains #1289
Changes from all commits
eb36ad1
a117a50
1fd892c
4333a89
bced989
7d91530
399b485
529a15a
10953fc
cd7bb17
fe75f5c
91f0eec
be09af5
9efb4a8
14dade8
e24ace5
026e54b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ var ConfigureLaneLegAsSource = operations.NewSequence( | |
"Configures lane leg as source on CCIP 1.6.0", | ||
func(b operations.Bundle, chains cldf_chain.BlockChains, input lanes.UpdateLanesInput) (sequences.OnChainOutput, error) { | ||
var result sequences.OnChainOutput | ||
fmt.Println("Configuring lane leg as source:", input) | ||
fmt.Println("EVM Configuring lane leg as source:", input) | ||
|
||
result, err := sequences.RunAndMergeSequence(b, chains, FeeQuoterApplyDestChainConfigUpdatesSequence, FeeQuoterApplyDestChainConfigUpdatesSequenceInput{ | ||
Address: common.BytesToAddress(input.Source.FeeQuoter), | ||
|
@@ -108,7 +108,7 @@ var ConfigureLaneLegAsDest = operations.NewSequence( | |
"Configures lane leg as destination on CCIP 1.6.0", | ||
func(b operations.Bundle, chains cldf_chain.BlockChains, input lanes.UpdateLanesInput) (sequences.OnChainOutput, error) { | ||
var result sequences.OnChainOutput | ||
fmt.Println("Configuring lane leg as destination:", input) | ||
fmt.Println("EVM Configuring lane leg as destination:", input) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use b.Logger |
||
|
||
result, err := sequences.RunAndMergeSequence(b, chains, OffRampApplySourceChainConfigUpdatesSequence, OffRampApplySourceChainConfigUpdatesSequenceInput{ | ||
Address: common.BytesToAddress(input.Source.OffRamp), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,6 @@ override*.toml | |
# go work files | ||
go.work* | ||
devnet.config.yaml | ||
|
||
# deployment | ||
deployment/**/*.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package utils | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't need to review |
||
|
||
// Mapping between Semver Tags and commit SHA from chainlink-ccip repository for Solana Contracts. | ||
// Source tags (GitHub releases): | ||
// - solana-v0.1.2 | ||
// - solana-v0.1.1-cctp | ||
// - solana-v0.1.1 | ||
// - solana-v0.1.0 | ||
|
||
// Public version constants. | ||
const ( | ||
// Versions for Chainlink CCIP Solana contracts | ||
VersionSolanaV0_1_2 = "solana-v0.1.2" | ||
VersionSolanaV0_1_1 = "solana-v0.1.1-cctp" | ||
VersionSolanaV0_1_1TokenPools = "solana-v0.1.1" | ||
VersionSolanaV0_1_0 = "solana-v0.1.0" | ||
) | ||
|
||
// VersionToShortCommitSHA maps a version tag to its corresponding short commit SHA. | ||
var VersionToShortCommitSHA = map[string]string{ | ||
VersionSolanaV0_1_2: "b96a80a69ad2", | ||
VersionSolanaV0_1_1: "7f8a0f403c3a", | ||
VersionSolanaV0_1_1TokenPools: "ee587a6c0562", | ||
VersionSolanaV0_1_0: "be8d09930aaa", | ||
} | ||
|
||
var VersionToFullCommitSHA = map[string]string{ | ||
VersionSolanaV0_1_2: "b96a80a69ad2696c48d645d0cf7807fd02a212c8", | ||
VersionSolanaV0_1_1: "7f8a0f403c3acbf740fa6d50d71bfb80a8b12ab8", | ||
VersionSolanaV0_1_1TokenPools: "ee587a6c056204009310019b790ed6d474825316", | ||
VersionSolanaV0_1_0: "be8d09930aaaae31b574ef316ca73021fe272b08", | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package utils | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't need to review |
||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/gagliardetto/solana-go" | ||
datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" | ||
"github.com/smartcontractkit/chainlink-deployments-framework/datastore" | ||
) | ||
|
||
// ToByteArray formats a datastore.AddressRef into a byte slice. | ||
func ToByteArray(ref datastore.AddressRef) (bytes []byte, err error) { | ||
if ref.Address == "" { | ||
return nil, fmt.Errorf("address is empty in ref: %s", datastore_utils.SprintRef(ref)) | ||
} | ||
addr, err := ToAddress(ref) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return addr.Bytes(), nil | ||
} | ||
|
||
// ToAddress formats a datastore.AddressRef into a solana.PublicKey. | ||
func ToAddress(ref datastore.AddressRef) (commonAddress solana.PublicKey, err error) { | ||
if ref.Address == "" { | ||
return solana.PublicKey{}, fmt.Errorf("address is empty in ref: %s", datastore_utils.SprintRef(ref)) | ||
} | ||
out, err := solana.PublicKeyFromBase58(ref.Address) | ||
if err != nil { | ||
return solana.PublicKey{}, fmt.Errorf("address is not a valid base58 address in ref: %s", datastore_utils.SprintRef(ref)) | ||
} | ||
return out, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use b.Logger