Skip to content
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

update native programs to use 2.1 #337

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
17 changes: 9 additions & 8 deletions .github/workflows/solana-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,26 +179,27 @@ jobs:

# Install pnpm
npm install --global pnpm
- name: Setup Solana stable
- name: Setup Solana Beta
uses: heyAyushh/[email protected]
with:
solana-cli-version: stable
- name: Build and Test with Stable
solana-cli-version: beta
- name: Build and Test with Beta
run: |
source build_and_test.sh
solana -V
rustc -V
process_projects "stable"
- name: Setup Solana 1.18.17
process_projects "beta"
- name: Setup Solana Stable
uses: heyAyushh/[email protected]
with:
solana-cli-version: 1.18.17
- name: Build and Test with 1.18.17
solana-cli-version: stable
- name: Build and Test with Stable
continue-on-error: true
run: |
source build_and_test.sh
solana -V
rustc -V
process_projects "1.18.17"
process_projects "stable"

- name: Set failed projects output
id: set-failed
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/steel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@ jobs:
# Make the script executable
chmod +x build_and_test.sh

- name: Setup Solana stable
- name: Setup Solana Beta
uses: heyAyushh/[email protected]
with:
solana-cli-version: stable
- name: Build and Test with Stable
solana-cli-version: beta
- name: Build and Test with Beta
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
Expand All @@ -265,13 +265,13 @@ jobs:
solana -V
rustc -V
solana-keygen new --no-bip39-passphrase
process_projects "stable"
process_projects "beta"
sccache --show-stats
- name: Setup Solana 1.18.17
- name: Setup Solana Stable
uses: heyAyushh/[email protected]
with:
solana-cli-version: 1.18.17
- name: Build and Test with 1.18.17
solana-cli-version: stable
- name: Build and Test with Stable
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
Expand All @@ -280,7 +280,7 @@ jobs:
solana -V
rustc -V
solana-keygen new --no-bip39-passphrase --force
process_projects "1.18.17"
process_projects "stable"
sccache --show-stats

- name: Set failed projects output
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Onchain program examples for :anchor: Anchor :crab: Native Rust, [TS] TypeScript and :snake: Python

[![Native](https://github.com/solana-developers/program-examples/actions/workflows/solana-native.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/solana-native.yml) [![Anchor](https://github.com/solana-developers/program-examples/actions/workflows/anchor.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/anchor.yml) [![Steel](https://github.com/solana-developers/program-examples/actions/workflows/steel.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/steel.yml) [![Poseidon](https://github.com/solana-developers/program-examples/actions/workflows/poseidon.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/poseidon.yml)

This repo contains Solana onchain programs (referred to as 'Smart Contracts' in other blockchains).

> [!NOTE]
Expand Down
2 changes: 1 addition & 1 deletion basics/account-data/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
solana-program = "=1.18.17"
solana-program = "2.1"
borsh = "0.9.3"
borsh-derive = "0.9.1"

Expand Down
2 changes: 1 addition & 1 deletion basics/checking-accounts/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
solana-program = "=1.18.17"
solana-program = "2.1"

[lib]
crate-type = ["cdylib", "lib"]
2 changes: 1 addition & 1 deletion basics/close-account/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "=1.18.17"
solana-program = "2.1"

[lib]
crate-type = ["cdylib", "lib"]
2 changes: 1 addition & 1 deletion basics/counter/mpl-stack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ default = []
[dependencies]
borsh = "0.9"
shank = "0.0.8"
solana-program = "=1.18.17"
solana-program = "2.1"
2 changes: 1 addition & 1 deletion basics/counter/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ default = []

[dependencies]
borsh = "0.9.3"
solana-program = "=1.18.17"
solana-program = "2.1"
2 changes: 1 addition & 1 deletion basics/create-account/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
solana-program = "=1.18.17"
solana-program = "2.1"

[lib]
crate-type = ["cdylib", "lib"]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cpi = ["no-entrypoint"]
[dependencies]
borsh = "0.10"
borsh-derive = "0.10"
solana-program = "=1.18.17"
solana-program = "2.1"
cross-program-invocatio-native-lever = { path = "../lever", features = ["cpi"] }

[lib]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cpi = ["no-entrypoint"]
[dependencies]
borsh = "0.10"
borsh-derive = "0.10"
solana-program = "=1.18.17"
solana-program = "2.1"

[lib]
crate-type = ["cdylib", "lib"]
2 changes: 1 addition & 1 deletion basics/hello-solana/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
solana-program = "=1.18.17"
solana-program = "2.1"

[lib]
crate-type = ["cdylib", "lib"]
5 changes: 3 additions & 2 deletions basics/hello-solana/steel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ readme = "./README.md"
keywords = ["solana"]

[workspace.dependencies]
hello-solana-api = { path = "./api", version = "0.1.0" }
bytemuck = "1.14"
num_enum = "0.7"
solana-program = "=2.0.13"
steel = "=2.1.1"
solana-program = "2.1"
steel = "2.0"
thiserror = "1.0"
solana-sdk = "1.18"
2 changes: 1 addition & 1 deletion basics/pda-rent-payer/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
solana-program = "=1.18.17"
solana-program = "2.1"
borsh = "0.9.3"
borsh-derive = "0.9.1"

Expand Down
2 changes: 1 addition & 1 deletion basics/processing-instructions/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "=1.18.17"
solana-program = "2.1"

[lib]
crate-type = ["cdylib", "lib"]
2 changes: 1 addition & 1 deletion basics/program-derived-addresses/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
solana-program = "=1.18.17"
solana-program = "2.1"
borsh = "0.9.3"
borsh-derive = "0.9.1"

Expand Down
2 changes: 1 addition & 1 deletion basics/realloc/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "=1.18.17"
solana-program = "2.1"

[lib]
crate-type = ["cdylib", "lib"]
2 changes: 1 addition & 1 deletion basics/rent/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "=1.18.17"
solana-program = "2.1"

[lib]
crate-type = ["cdylib", "lib"]
2 changes: 1 addition & 1 deletion basics/repository-layout/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "=1.18.17"
solana-program = "2.1"

[lib]
crate-type = ["cdylib", "lib"]
2 changes: 1 addition & 1 deletion basics/transfer-sol/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "=1.18.17"
solana-program = "2.1"

[lib]
crate-type = ["cdylib", "lib"]
2 changes: 1 addition & 1 deletion tokens/create-token/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "1.16.10"
solana-program = "2.1"
spl-token = { version = "4.0.0", features = [ "no-entrypoint" ] }
spl-associated-token-account = { version = "2.0.0", features = [ "no-entrypoint" ] }
mpl-token-metadata = { version = "1.11", features = [ "no-entrypoint" ] }
Expand Down
2 changes: 1 addition & 1 deletion tokens/nft-minter/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "1.16.10"
solana-program = "2.1"
spl-token = { version="4.0.0", features = [ "no-entrypoint" ] }
spl-associated-token-account = { version="2.0.0", features = [ "no-entrypoint" ] }
mpl-token-metadata = { version="1.11" }
Expand Down
2 changes: 1 addition & 1 deletion tokens/pda-mint-authority/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "1.16.10"
solana-program = "2.1"
spl-token = { version="4.0.0", features = [ "no-entrypoint" ] }
spl-associated-token-account = { version="2.0.0", features = [ "no-entrypoint" ] }
mpl-token-metadata = { version="1.11", features = [ "no-entrypoint" ] }
Expand Down
2 changes: 1 addition & 1 deletion tokens/spl-token-minter/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "1.16.10"
solana-program = "2.1"
spl-token = { version="4.0.0", features = [ "no-entrypoint" ] }
spl-associated-token-account = { version="2.0.0", features = [ "no-entrypoint" ] }
mpl-token-metadata = { version="1.11", features = [ "no-entrypoint" ] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "1.16.10"
solana-program = "2.1"
spl-associated-token-account = { version="2.0.0", features = [ "no-entrypoint" ] }
spl-token-2022 = {version = "0.7.0", features = [ "no-entrypoint" ] }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "=1.18.17"
solana-program = "2.1"
spl-associated-token-account = { version="2.0.0", features = [ "no-entrypoint" ] }
spl-token-2022 = {version = "0.7.0", features = [ "no-entrypoint" ] }

Expand Down
2 changes: 1 addition & 1 deletion tokens/token-2022/transfer-fee/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.10.3"
borsh-derive = "0.9.1"
solana-program = "=1.18.17"
solana-program = "2.1"
spl-associated-token-account = { version="2.0.0", features = [ "no-entrypoint" ] }
spl-token-2022 = {version = "0.7.0", features = [ "no-entrypoint" ] }

Expand Down
2 changes: 1 addition & 1 deletion tokens/transfer-tokens/native/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
borsh-derive = "0.9.1"
solana-program = "1.16.10"
solana-program = "2.1"
spl-token = { version="4.0.0", features = [ "no-entrypoint" ] }
spl-associated-token-account = { version = "2.0.0", features = [ "no-entrypoint" ] }
mpl-token-metadata = { version="1.11", features = ["no-entrypoint"] }
Expand Down
Loading