Skip to content

Commit 2bdb569

Browse files
committed
remove workspace and steel test
1 parent 3a36ab8 commit 2bdb569

File tree

12 files changed

+352
-297
lines changed

12 files changed

+352
-297
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ members = [
1515
"basics/cross-program-invocation/anchor/programs/*",
1616
"basics/hello-solana/native/program",
1717
"basics/hello-solana/anchor/programs/*",
18-
"basics/hello-solana/steel/",
18+
"basics/hello-solana/steel/program/",
1919
"basics/pda-rent-payer/native/program",
2020
"basics/pda-rent-payer/anchor/programs/*",
2121
"basics/processing-instructions/native/program",
Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
11
[workspace]
2+
members = [
3+
"program",
4+
]
25
resolver = "2"
3-
members = ["api", "program"]
46

5-
[workspace.package]
6-
version = "0.1.0"
7-
edition = "2021"
8-
license = "Apache-2.0"
9-
homepage = ""
10-
documentation = ""
11-
repository = ""
12-
readme = "./README.md"
13-
keywords = ["solana"]
14-
15-
[workspace.dependencies]
16-
hello-solana-api = { path = "./api", version = "0.1.0" }
17-
bytemuck = "1.14"
18-
num_enum = "0.7"
19-
solana-program = "1.18"
20-
steel = "2.0"
21-
thiserror = "1.0"
22-
solana-sdk = "1.18"
7+
[profile.release]
8+
overflow-checks = true

basics/hello-solana/steel/api/Cargo.toml

Lines changed: 0 additions & 11 deletions
This file was deleted.

basics/hello-solana/steel/api/src/error.rs

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
[package]
2-
name = "hello-solana-program"
2+
name = "steel-hello-solana"
33
version = "0.1.0"
44
edition = "2021"
55

66
[lib]
77
crate-type = ["cdylib", "lib"]
88

9-
[dependencies]
10-
hello-solana-api.workspace = true
11-
solana-program.workspace = true
12-
steel.workspace = true
13-
14-
159
[dev-dependencies]
1610
base64 = "0.21"
1711
rand = "0.8.5"
18-
solana-program-test = "1.18"
19-
solana-sdk = "1.18"
12+
solana-sdk = "^1.18"
2013
tokio = { version = "1.35", features = ["full"] }
14+
15+
[dependencies]
16+
bytemuck = "1.14"
17+
num_enum = "0.7"
18+
solana-program = "^1.18"
19+
steel = "2.0"
20+
thiserror = "1.0"
21+
# ~

basics/hello-solana/steel/api/src/lib.rs renamed to basics/hello-solana/steel/program/src/api/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
pub mod error;
21
pub mod instruction;
32
pub mod sdk;
43

54
pub mod prelude {
6-
pub use crate::error::*;
7-
pub use crate::instruction::*;
8-
pub use crate::sdk::*;
5+
pub use super::instruction::*;
6+
pub use super::sdk::*;
7+
pub use super::ID;
98
}
109

1110
use steel::*;

basics/hello-solana/steel/api/src/sdk.rs renamed to basics/hello-solana/steel/program/src/api/sdk.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
use super::prelude::*;
12
use steel::*;
23

3-
use crate::prelude::*;
4-
54
pub fn hello(signer: Pubkey) -> Instruction {
65
Instruction {
7-
program_id: crate::ID,
6+
program_id: ID,
87
accounts: vec![AccountMeta::new(signer, true)],
98
data: HelloSolana {}.to_bytes(),
109
}

basics/hello-solana/steel/program/src/hello.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use crate::api::prelude::*;
12
use solana_program::msg;
23
use steel::*;
34

@@ -10,7 +11,7 @@ pub fn process_hello(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResul
1011

1112
msg!("Hello, Solana!");
1213

13-
msg!("Our program's Program ID: {}", &hello_solana_api::ID);
14+
msg!("Our program's Program ID: {}", ID);
1415

1516
Ok(())
1617
}

0 commit comments

Comments
 (0)