Skip to content

Commit

Permalink
spl-token-minter/steel - use workspace, avoid conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
thewuhxyz committed Nov 2, 2024
1 parent 71f27ba commit c244bd8
Show file tree
Hide file tree
Showing 9 changed files with 174 additions and 380 deletions.
210 changes: 42 additions & 168 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ members = [
"basics/repository-layout/anchor/programs/*",
"basics/transfer-sol/native/program",
"basics/transfer-sol/anchor/programs/*",
"tokens/spl-token-minter/steel/program",
"tokens/token-2022/mint-close-authority/native/program",
"tokens/token-2022/non-transferable/native/program",
"tokens/token-2022/default-account-state/native/program",
Expand Down
3 changes: 3 additions & 0 deletions tokens/spl-token-minter/steel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[workspace]
members = ["program"]
resolver = "2"
10 changes: 5 additions & 5 deletions tokens/spl-token-minter/steel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
"@solana/spl-token": "^0.4.9",
"@solana/web3.js": "^1.95.4",
"borsh": "^0.7.0",
"buffer": "^6.0.3",
"fs": "^0.0.1-security"
"buffer": "^6.0.3"
},
"devDependencies": {
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.1",
"@types/mocha": "^9.1.1",
"@types/mocha": "^10.0.9",
"@types/node": "^22.8.6",
"borsh": "0.7.0",
"chai": "^4.3.4",
"mocha": "^9.0.3",
"mocha": "^10.8.2",
"solana-bankrun": "^0.4.0",
"ts-mocha": "^10.0.0",
"typescript": "^4.3.5",
"typescript": "^5.6.3",
"zx": "^8.1.4"
}
}
318 changes: 120 additions & 198 deletions tokens/spl-token-minter/steel/pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// Helper for creating steel instruction with borsh.
/// Helper for creating steel instruction with borsh.
/// Not required, but helpful with typing and CPI
///
#[macro_export]
Expand All @@ -9,7 +9,7 @@ macro_rules! borsh_instruction {
$discriminator_name::$struct_name as u8
}
}

#[allow(dead_code)]
// adds discriminator to the instruction data, helpful with cpis etc.
impl $struct_name {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct MintTo {

impl MintTo {
pub fn process(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult {
let args = MintTo::try_from_bytes(data)?;
let args = MintTo::try_from_bytes(data)?;

let [mint_account, mint_authority, associated_token_account, payer, system_program, token_program, associated_token_program] =
accounts
Expand Down
4 changes: 0 additions & 4 deletions tokens/spl-token-minter/steel/program/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ pub fn process_instruction(
accounts: &[AccountInfo],
data: &[u8],
) -> ProgramResult {
// Use `crate::ID` for program_id in your program
//
// e.g parse_instruction(&crate::ID, program_id, data)
//
let (ix, data) = parse_instruction(&crate::ID, program_id, data)?;

match ix {
Expand Down
2 changes: 1 addition & 1 deletion tokens/spl-token-minter/steel/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"types": ["mocha", "chai"],
"types": ["mocha", "chai", "node"],
"typeRoots": ["./node_modules/@types"],
"lib": ["es2015"],
"module": "commonjs",
Expand Down

0 comments on commit c244bd8

Please sign in to comment.