This repository contains the Chainlink Deployments Framework, a comprehensive set of libraries that enables developers to build, manage, and execute(in future) deployment changesets. The framework includes the Operations API and Datastore API.
$ go get github.com/smartcontractkit/chainlink-deployments-framework
import (
"github.com/smartcontractkit/chainlink-deployments-framework/deployment" // for writing changesets (migrated from chainlink/deployments
"github.com/smartcontractkit/chainlink-deployments-framework/operations" // for operations API
"github.com/smartcontractkit/chainlink-deployments-framework/datastore" // for datastore API
)
Install the required tools using asdf:
asdf install
task lint
task test
To add a new chain to the framework, follow these steps:
- Create a new directory under
chains/
with the name of your chain (e.g.,chains/newchain/
). - Implement the chain-specific logic:
- Create a new
Chain
struct that embeds theChainMetadata
struct - See the Sui or TON implementations as reference examples. EVM, Solana, and Aptos chains follow a different implementation pattern as they were added before CLDF.
- Update
chain/blockchain.go
:
- Add
var _ BlockChain = newchain.Chain{}
at the top to verify interface compliance - Create a new getter method (e.g.,
NewChainChains()
) that returnsmap[uint64]newchain.Chain
(e.g.,NewSuiChains()
)
- Write comprehensive tests:
- Test chain instantiation
- Test all interface methods
- Test the getter method in BlockChains
For instructions on how to contribute to chainlink-deployments-framework
and the release process,
see CONTRIBUTING.md
For instructions on how to release chainlink-deployments-framework
,
see RELEASE.md