Skip to content

Commit d0d81df

Browse files
authored
Solana Contracts v1.6.0 (#1292)
* Allow zero rates and capacity in Solana Token Pools (#1290) * Bump version + add changelog in solana contracts * add comment * Bump Version * Remove target Folder
1 parent 6ca090f commit d0d81df

File tree

17 files changed

+112
-39
lines changed

17 files changed

+112
-39
lines changed

chains/solana/CHANGELOG.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Changelog - CCIP Solana Contracts
2+
3+
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).
4+
5+
---
6+
7+
## [Unreleased] (1.6.0)
8+
<!-- ### Added
9+
- (Placeholder for upcoming features) -->
10+
11+
### Changed
12+
13+
- [Token Pools] Allow setting rate limit with rate and capacity set to 0 [#1290](https://github.com/smartcontractkit/chainlink-ccip/pull/1290)
14+
15+
<!-- ### Fixed
16+
- (Placeholder for bug fixes) -->
17+
18+
---
19+
20+
## [0.1.2]
21+
22+
- Commit [`b96a80a69ad2`](https://github.com/smartcontractkit/chainlink-ccip/commit/b96a80a69ad2)
23+
- Git Tag: [solana-v0.1.2](https://github.com/smartcontractkit/chainlink-ccip/releases/tag/solana-v0.1.2)
24+
25+
### Added
26+
27+
- [Token Pools] Modify Rate Limit Admin by the owner of the State PDA of the Token Pool.
28+
29+
---
30+
31+
## [0.1.1]
32+
33+
### Core Contracts & CCTP Token Pool
34+
35+
1. Commit [`7f8a0f403c3a`](https://github.com/smartcontractkit/chainlink-ccip/commit/7f8a0f403c3a)
36+
1. Git Tag: [solana-v0.1.1-cctp](https://github.com/smartcontractkit/chainlink-ccip/releases/tag/solana-v0.1.1-cctp)
37+
38+
#### Added
39+
40+
- **Offramp**:
41+
42+
1. Buffer execution
43+
1. Dynamic calculation of accounts
44+
45+
- **Router**:
46+
47+
1. Updated message routing to support the extended flow with new token pools.
48+
1. Support for tokens with extensions
49+
50+
- **CCTP Token Pool**:
51+
52+
1. New **Token Pool for CCTP (Circle Cross-Chain Transfer Protocol)**.
53+
54+
### Lock and Release + Burn and Mint Token Pools
55+
56+
1. Commit: [`ee587a6c0562`](https://github.com/smartcontractkit/chainlink-ccip/commit/ee587a6c0562)
57+
1. Git Tag: [solana-v0.1.1](https://github.com/smartcontractkit/chainlink-ccip/releases/tag/solana-v0.1.1)
58+
59+
#### Added
60+
61+
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.
62+
1. Added a method to modify mint authority from the Signer PDA to the token multisig with validations
63+
1. Introduced **self-served onboarding** a toggle for the global admin to configure if token pool self served is enabled or not.
64+
65+
---
66+
67+
## [0.1.0]
68+
69+
- Commit [`be8d09930aaa`](https://github.com/smartcontractkit/chainlink-ccip/commit/be8d09930aaa)
70+
- Git Tag: [solana-v0.1.0](https://github.com/smartcontractkit/chainlink-ccip/releases/tag/solana-v0.1.0)
71+
72+
### Initial Release
73+
74+
This version represents the **first implementation of CCIP on Solana**.
75+
76+
### Added
77+
78+
- **Programs included** with the basic CCIP functionality on Solana:
79+
1. **Router**: orchestrates cross-chain message routing, includes the OnRamp (messages from Solana to any).
80+
1. **OffRamp**: manages receiving messages in Solana (any to Solana) and processes token price updates.
81+
1. **Fee Quoter**: message validation and fee calculations
82+
1. **Token Pools**: base contracts for token custody and transfers.

chains/solana/contracts/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chains/solana/contracts/programs/base-token-pool/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "base-token-pool"
3-
version = "0.1.1"
3+
version = "1.6.0"
44
description = "Created with Anchor"
55
edition = "2021"
66

chains/solana/contracts/programs/base-token-pool/src/rate_limiter.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ impl RateLimitTokenBucket {
5454

5555
if self.tokens < request_tokens {
5656
let rate = self.cfg.rate;
57+
require_neq!(rate, 0, CcipTokenPoolError::RLRateLimitReached);
5758
// Wait required until the bucket is refilled enough to accept this value, round up to next higher second
5859
// Consume is not guaranteed to succeed after wait time passes if there is competing traffic.
5960
// This acts as a lower bound of wait time.
@@ -106,7 +107,7 @@ impl RateLimitTokenBucket {
106107
fn validate_token_bucket_config(cfg: &RateLimitConfig) -> Result<()> {
107108
if cfg.enabled {
108109
require!(
109-
cfg.rate < cfg.capacity && cfg.rate != 0,
110+
cfg.rate <= cfg.capacity, // allow setting rate and capacity to 0
110111
CcipTokenPoolError::RLInvalidRateLimitRate
111112
);
112113
} else {

chains/solana/contracts/programs/burnmint-token-pool/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "burnmint-token-pool"
3-
version = "0.1.2"
3+
version = "1.6.0"
44
description = "Created with Anchor"
55
edition = "2021"
66

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

chains/solana/contracts/programs/cctp-token-pool/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cctp-token-pool"
3-
version = "0.1.1"
3+
version = "1.6.0"
44
description = "USDC Token Pool for CCIP utilizing CCTP"
55
edition = "2021"
66

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

chains/solana/contracts/programs/lockrelease-token-pool/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lockrelease-token-pool"
3-
version = "0.1.2"
3+
version = "1.6.0"
44
description = "Created with Anchor"
55
edition = "2021"
66

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

chains/solana/contracts/programs/test-token-pool/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ anchor-lang = { version = "0.29.0", features = ["init-if-needed"] }
2020
anchor-spl = "0.29.0"
2121
solana-program = "1.17.25" # pin solana to 1.17
2222
spl-math = { version = "0.2.0", features = [ "no-entrypoint" ] }
23-
base-token-pool = { version = "0.1.1", path = "../base-token-pool/", features = ["no-entrypoint"] }
24-
burnmint-token-pool = { version = "0.1.1", path = "../burnmint-token-pool", features = ["no-entrypoint"] }
25-
lockrelease-token-pool = { version = "0.1.1", path = "../lockrelease-token-pool", features = ["no-entrypoint"] }
23+
base-token-pool = { version = "1.6.0", path = "../base-token-pool/", features = ["no-entrypoint"] }
24+
burnmint-token-pool = { version = "1.6.0", path = "../burnmint-token-pool", features = ["no-entrypoint"] }
25+
lockrelease-token-pool = { version = "1.6.0", path = "../lockrelease-token-pool", features = ["no-entrypoint"] }
2626
rmn_remote = {path = "../rmn-remote", features = ["cpi"]}
2727
ccip_common = {path = "../ccip-common"}
2828

chains/solana/contracts/target/idl/base_token_pool.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.1.1",
2+
"version": "1.6.0",
33
"name": "base_token_pool",
44
"instructions": [],
55
"types": [

chains/solana/contracts/target/idl/burnmint_token_pool.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.1.2",
2+
"version": "1.6.0",
33
"name": "burnmint_token_pool",
44
"instructions": [
55
{

0 commit comments

Comments
 (0)