Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions chains/solana/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Changelog - CCIP Solana Contracts

This document describes the changes introduced in the different versions of the **Chainlink CCIP Solana programs**, located in [`chains/solana/contracts/programs`](https://github.com/smartcontractkit/chainlink-ccip/tree/main/chains/solana/contracts/programs).

---

## [Unreleased] (1.6.0)
<!-- ### Added
- (Placeholder for upcoming features) -->

### Changed

- [Token Pools] Allow setting rate limit with rate and capacity set to 0 [#1290](https://github.com/smartcontractkit/chainlink-ccip/pull/1290)

<!-- ### Fixed
- (Placeholder for bug fixes) -->

---

## [0.1.2]

- Commit [`b96a80a69ad2`](https://github.com/smartcontractkit/chainlink-ccip/commit/b96a80a69ad2)
- Git Tag: [solana-v0.1.2](https://github.com/smartcontractkit/chainlink-ccip/releases/tag/solana-v0.1.2)

### Added

- [Token Pools] Modify Rate Limit Admin by the owner of the State PDA of the Token Pool.

---

## [0.1.1]

### Core Contracts & CCTP Token Pool

1. Commit [`7f8a0f403c3a`](https://github.com/smartcontractkit/chainlink-ccip/commit/7f8a0f403c3a)
1. Git Tag: [solana-v0.1.1-cctp](https://github.com/smartcontractkit/chainlink-ccip/releases/tag/solana-v0.1.1-cctp)

#### Added

- **Offramp**:

1. Buffer execution
1. Dynamic calculation of accounts

- **Router**:

1. Updated message routing to support the extended flow with new token pools.
1. Support for tokens with extensions

- **CCTP Token Pool**:

1. New **Token Pool for CCTP (Circle Cross-Chain Transfer Protocol)**.

### Lock and Release + Burn and Mint Token Pools

1. Commit: [`ee587a6c0562`](https://github.com/smartcontractkit/chainlink-ccip/commit/ee587a6c0562)
1. Git Tag: [solana-v0.1.1](https://github.com/smartcontractkit/chainlink-ccip/releases/tag/solana-v0.1.1)

#### Added

1. Added **multisig support** when minting tokens. Tokens that have a multisig as mint authority now are able to be mint in the token pool.
1. Added a method to modify mint authority from the Signer PDA to the token multisig with validations
1. Introduced **self-served onboarding** a toggle for the global admin to configure if token pool self served is enabled or not.

---

## [0.1.0]

- Commit [`be8d09930aaa`](https://github.com/smartcontractkit/chainlink-ccip/commit/be8d09930aaa)
- Git Tag: [solana-v0.1.0](https://github.com/smartcontractkit/chainlink-ccip/releases/tag/solana-v0.1.0)

### Initial Release

This version represents the **first implementation of CCIP on Solana**.

### Added

- **Programs included** with the basic CCIP functionality on Solana:
1. **Router**: orchestrates cross-chain message routing, includes the OnRamp (messages from Solana to any).
1. **OffRamp**: manages receiving messages in Solana (any to Solana) and processes token price updates.
1. **Fee Quoter**: message validation and fee calculations
1. **Token Pools**: base contracts for token custody and transfers.
8 changes: 4 additions & 4 deletions chains/solana/contracts/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "base-token-pool"
version = "0.1.1"
version = "1.6.0"
description = "Created with Anchor"
edition = "2021"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ impl RateLimitTokenBucket {

if self.tokens < request_tokens {
let rate = self.cfg.rate;
require_neq!(rate, 0, CcipTokenPoolError::RLRateLimitReached);
// Wait required until the bucket is refilled enough to accept this value, round up to next higher second
// Consume is not guaranteed to succeed after wait time passes if there is competing traffic.
// This acts as a lower bound of wait time.
Expand Down Expand Up @@ -106,7 +107,7 @@ impl RateLimitTokenBucket {
fn validate_token_bucket_config(cfg: &RateLimitConfig) -> Result<()> {
if cfg.enabled {
require!(
cfg.rate < cfg.capacity && cfg.rate != 0,
cfg.rate <= cfg.capacity, // allow setting rate and capacity to 0
CcipTokenPoolError::RLInvalidRateLimitRate
);
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "burnmint-token-pool"
version = "0.1.2"
version = "1.6.0"
description = "Created with Anchor"
edition = "2021"

Expand All @@ -20,7 +20,7 @@ anchor-lang = { version = "0.29.0", features = ["init-if-needed"] }
anchor-spl = "0.29.0"
solana-program = "1.17.25" # pin solana to 1.17
spl-math = { version = "0.2.0", features = [ "no-entrypoint" ] }
base-token-pool = { version = "0.1.1", path = "../base-token-pool/", features = ["no-entrypoint"] }
base-token-pool = { version = "1.6.0", path = "../base-token-pool/", features = ["no-entrypoint"] }
rmn_remote = {path = "../rmn-remote", features = ["cpi"]}
ccip_common = {path = "../ccip-common"}

Expand Down
4 changes: 2 additions & 2 deletions chains/solana/contracts/programs/cctp-token-pool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cctp-token-pool"
version = "0.1.1"
version = "1.6.0"
description = "USDC Token Pool for CCIP utilizing CCTP"
edition = "2021"

Expand All @@ -18,7 +18,7 @@ default = []
[dependencies]
anchor-lang = { version = "0.29.0", features = ["init-if-needed"] }
anchor-spl = "0.29.0"
base-token-pool = { version = "0.1.1", path = "../base-token-pool/", features = ["no-entrypoint"] }
base-token-pool = { version = "1.6.0", path = "../base-token-pool/", features = ["no-entrypoint"] }
ccip_common = {path = "../ccip-common"}
solana-program = "1.17.25"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lockrelease-token-pool"
version = "0.1.2"
version = "1.6.0"
description = "Created with Anchor"
edition = "2021"

Expand All @@ -20,7 +20,7 @@ anchor-lang = { version = "0.29.0", features = ["init-if-needed"] }
anchor-spl = "0.29.0"
solana-program = "1.17.25" # pin solana to 1.17
spl-math = { version = "0.2.0", features = [ "no-entrypoint" ] }
base-token-pool = { version = "0.1.1", path = "../base-token-pool/", features = ["no-entrypoint"] }
base-token-pool = { version = "1.6.0", path = "../base-token-pool/", features = ["no-entrypoint"] }
rmn_remote = {path = "../rmn-remote", features = ["cpi"]}
ccip_common = {path = "../ccip-common"}

Expand Down
6 changes: 3 additions & 3 deletions chains/solana/contracts/programs/test-token-pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ anchor-lang = { version = "0.29.0", features = ["init-if-needed"] }
anchor-spl = "0.29.0"
solana-program = "1.17.25" # pin solana to 1.17
spl-math = { version = "0.2.0", features = [ "no-entrypoint" ] }
base-token-pool = { version = "0.1.1", path = "../base-token-pool/", features = ["no-entrypoint"] }
burnmint-token-pool = { version = "0.1.1", path = "../burnmint-token-pool", features = ["no-entrypoint"] }
lockrelease-token-pool = { version = "0.1.1", path = "../lockrelease-token-pool", features = ["no-entrypoint"] }
base-token-pool = { version = "1.6.0", path = "../base-token-pool/", features = ["no-entrypoint"] }
burnmint-token-pool = { version = "1.6.0", path = "../burnmint-token-pool", features = ["no-entrypoint"] }
lockrelease-token-pool = { version = "1.6.0", path = "../lockrelease-token-pool", features = ["no-entrypoint"] }
rmn_remote = {path = "../rmn-remote", features = ["cpi"]}
ccip_common = {path = "../ccip-common"}

Expand Down
2 changes: 1 addition & 1 deletion chains/solana/contracts/target/idl/base_token_pool.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.1",
"version": "1.6.0",
"name": "base_token_pool",
"instructions": [],
"types": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.2",
"version": "1.6.0",
"name": "burnmint_token_pool",
"instructions": [
{
Expand Down
2 changes: 1 addition & 1 deletion chains/solana/contracts/target/idl/cctp_token_pool.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.1",
"version": "1.6.0",
"name": "cctp_token_pool",
"instructions": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.2",
"version": "1.6.0",
"name": "lockrelease_token_pool",
"instructions": [
{
Expand Down
4 changes: 2 additions & 2 deletions chains/solana/contracts/target/types/base_token_pool.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export type BaseTokenPool = {
"version": "0.1.1",
"version": "1.6.0",
"name": "base_token_pool",
"instructions": [],
"types": [
Expand Down Expand Up @@ -869,7 +869,7 @@ export type BaseTokenPool = {
};

export const IDL: BaseTokenPool = {
"version": "0.1.1",
"version": "1.6.0",
"name": "base_token_pool",
"instructions": [],
"types": [
Expand Down
4 changes: 2 additions & 2 deletions chains/solana/contracts/target/types/burnmint_token_pool.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export type BurnmintTokenPool = {
"version": "0.1.2",
"version": "1.6.0",
"name": "burnmint_token_pool",
"instructions": [
{
Expand Down Expand Up @@ -947,7 +947,7 @@ export type BurnmintTokenPool = {
};

export const IDL: BurnmintTokenPool = {
"version": "0.1.2",
"version": "1.6.0",
"name": "burnmint_token_pool",
"instructions": [
{
Expand Down
4 changes: 2 additions & 2 deletions chains/solana/contracts/target/types/cctp_token_pool.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export type CctpTokenPool = {
"version": "0.1.1",
"version": "1.6.0",
"name": "cctp_token_pool",
"instructions": [
{
Expand Down Expand Up @@ -1388,7 +1388,7 @@ export type CctpTokenPool = {
};

export const IDL: CctpTokenPool = {
"version": "0.1.1",
"version": "1.6.0",
"name": "cctp_token_pool",
"instructions": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export type LockreleaseTokenPool = {
"version": "0.1.2",
"version": "1.6.0",
"name": "lockrelease_token_pool",
"instructions": [
{
Expand Down Expand Up @@ -983,7 +983,7 @@ export type LockreleaseTokenPool = {
};

export const IDL: LockreleaseTokenPool = {
"version": "0.1.2",
"version": "1.6.0",
"name": "lockrelease_token_pool",
"instructions": [
{
Expand Down
14 changes: 2 additions & 12 deletions chains/solana/contracts/tests/ccip/tokenpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,15 +430,6 @@ func TestTokenPool(t *testing.T) {
c test_token_pool.RateLimitConfig
errStr string
}{
{
name: "enabled-zero-rate",
c: test_token_pool.RateLimitConfig{
Enabled: true,
Capacity: 10,
Rate: 0,
},
errStr: "invalid rate limit rate",
},
{
name: "enabled-rate-larger-than-capacity",
c: test_token_pool.RateLimitConfig{
Expand Down Expand Up @@ -490,15 +481,14 @@ func TestTokenPool(t *testing.T) {
).ValidateAndBuild()
require.NoError(t, err)

// test new rate limit admin
ixRatesValid, err := test_token_pool.NewSetChainRateLimitInstruction(config.EvmChainSelector, p.Mint,
test_token_pool.RateLimitConfig{
Enabled: true,
Capacity: amount,
Rate: 1,
}, test_token_pool.RateLimitConfig{
Enabled: false,
Capacity: 0,
Enabled: true,
Capacity: 10,
Rate: 0,
}, poolConfig, p.Chain[config.EvmChainSelector], user.PublicKey(), solana.SystemProgramID).ValidateAndBuild()
require.NoError(t, err)
Expand Down
Loading