Documentation
¶
Index ¶
Constants ¶
const ( ProgMCM = "mcm" ProgTimelock = "timelock" ProgAccessController = "access_controller" )
Program names
Variables ¶
var Directory = directory{ ProgMCM: {ID: "5vNJx78mz7KVMjhuipyr9jKBKcMrKYGdjGkgE4LUmjKk", Repo: repoCCIP, ProgramBufferBytes: 1 * 1024 * 1024}, ProgTimelock: {ID: "DoajfR5tK24xVw51fWcawUZWhAXD8yrBJVacc13neVQA", Repo: repoCCIP, ProgramBufferBytes: 1 * 1024 * 1024}, ProgAccessController: {ID: "6KsN58MTnRQ8FfPaXHiFPPFGDRioikj9CdPvPxZJdCjb", Repo: repoCCIP, ProgramBufferBytes: 1 * 1024 * 1024}, }
Directory maps program names to their corresponding program information, including program ID, repository, and buffer size for upgrades.
var (
MCMSProgramNames = []string{ProgMCM, ProgTimelock, ProgAccessController}
)
MCMSProgramNames names grouped by their usage.
Functions ¶
func DownloadChainlinkCCIPProgramArtifacts ¶
func DownloadChainlinkCCIPProgramArtifacts(ctx context.Context, targetDir string, sha string, lggr logger.Logger) error
DownloadChainlinkCCIPProgramArtifacts downloads CCIP program artifacts from the smartcontractkit/chainlink-ccip GitHub repository.
The function downloads a tar.gz archive containing Solana program binaries and extracts them to the specified target directory. If sha is empty, it automatically resolves the version by parsing the "github.com/smartcontractkit/chainlink-ccip/chains/solana" dependency from the nearest go.mod file.
Parameters:
- ctx: Context for cancellation and timeout control
- targetDir: Directory where extracted artifacts will be stored
- sha: Git commit SHA or version identifier. If empty, auto-resolved from go.mod
- lggr: Logger for progress and debug information. Can be nil to disable logging
Returns an error if the download fails, extraction fails, or SHA resolution fails.
func GetProgramBufferBytes ¶
GetProgramBufferBytes returns the size of the program buffer in bytes for the given program name.
Returns 0 if the program is not found or if the program is not upgradable.
func GetProgramID ¶
GetProgramID returns the program ID for a given program name.
Returns the program ID for the given program name or an empty string if the program is not found.
Types ¶
This section is empty.