diff --git a/tokens/spl-token-minter/steel/package.json b/tokens/spl-token-minter/steel/package.json index 2a2e900c..f99f8da7 100644 --- a/tokens/spl-token-minter/steel/package.json +++ b/tokens/spl-token-minter/steel/package.json @@ -8,8 +8,8 @@ }, "dependencies": { "@metaplex-foundation/mpl-token-metadata": "^2.5.2", - "@solana/spl-token": "^0.3.7", - "@solana/web3.js": "^1.73.0", + "@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" @@ -21,7 +21,7 @@ "borsh": "0.7.0", "chai": "^4.3.4", "mocha": "^9.0.3", - "solana-bankrun": "^0.3.0", + "solana-bankrun": "^0.4.0", "ts-mocha": "^10.0.0", "typescript": "^4.3.5", "zx": "^8.1.4" diff --git a/tokens/spl-token-minter/steel/pnpm-lock.yaml b/tokens/spl-token-minter/steel/pnpm-lock.yaml index 915f34b6..019a5f3c 100644 --- a/tokens/spl-token-minter/steel/pnpm-lock.yaml +++ b/tokens/spl-token-minter/steel/pnpm-lock.yaml @@ -12,10 +12,10 @@ importers: specifier: ^2.5.2 version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)(utf-8-validate@5.0.10) '@solana/spl-token': - specifier: ^0.3.7 - version: 0.3.11(@solana/web3.js@1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)(utf-8-validate@5.0.10) + specifier: ^0.4.9 + version: 0.4.9(@solana/web3.js@1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)(utf-8-validate@5.0.10) '@solana/web3.js': - specifier: ^1.73.0 + specifier: ^1.95.4 version: 1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) borsh: specifier: ^0.7.0 @@ -43,8 +43,8 @@ importers: specifier: ^9.0.3 version: 9.2.2 solana-bankrun: - specifier: ^0.3.0 - version: 0.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^0.4.0 + version: 0.4.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) ts-mocha: specifier: ^10.0.0 version: 10.0.0(mocha@9.2.2) @@ -126,6 +126,12 @@ packages: peerDependencies: typescript: '>=5' + '@solana/spl-token-group@0.0.7': + resolution: {integrity: sha512-V1N/iX7Cr7H0uazWUT2uk27TMqlqedpXHRqqAbVO2gvmJyT0E0ummMEAVQeXZ05ZhQ/xF39DLSdBp90XebWEug==} + engines: {node: '>=16'} + peerDependencies: + '@solana/web3.js': ^1.95.3 + '@solana/spl-token-metadata@0.1.6': resolution: {integrity: sha512-7sMt1rsm/zQOQcUWllQX9mD2O6KhSAtY1hFR2hfFwgqfFWzSY9E9GDvFVNYUI1F0iQKcm6HmePU9QbKRXTEBiA==} engines: {node: '>=16'} @@ -138,6 +144,12 @@ packages: peerDependencies: '@solana/web3.js': ^1.88.0 + '@solana/spl-token@0.4.9': + resolution: {integrity: sha512-g3wbj4F4gq82YQlwqhPB0gHFXfgsC6UmyGMxtSLf/BozT/oKd59465DbnlUK8L8EcimKMavxsVAMoLcEdeCicg==} + engines: {node: '>=16'} + peerDependencies: + '@solana/web3.js': ^1.95.3 + '@solana/web3.js@1.95.4': resolution: {integrity: sha512-sdewnNEA42ZSMxqkzdwEWi6fDgzwtJHaQa5ndUGEJYtoOnM6X5cvPmjoTUp7/k7bRrVAxfBgDnvQQHD6yhlLYw==} @@ -720,37 +732,37 @@ packages: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} - solana-bankrun-darwin-arm64@0.3.1: - resolution: {integrity: sha512-9LWtH/3/WR9fs8Ve/srdo41mpSqVHmRqDoo69Dv1Cupi+o1zMU6HiEPUHEvH2Tn/6TDbPEDf18MYNfReLUqE6A==} + solana-bankrun-darwin-arm64@0.4.0: + resolution: {integrity: sha512-6dz78Teoz7ez/3lpRLDjktYLJb79FcmJk2me4/YaB8WiO6W43OdExU4h+d2FyuAryO2DgBPXaBoBNY/8J1HJmw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - solana-bankrun-darwin-universal@0.3.1: - resolution: {integrity: sha512-muGHpVYWT7xCd8ZxEjs/bmsbMp8XBqroYGbE4lQPMDUuLvsJEIrjGqs3MbxEFr71sa58VpyvgywWd5ifI7sGIg==} + solana-bankrun-darwin-universal@0.4.0: + resolution: {integrity: sha512-zSSw/Jx3KNU42pPMmrEWABd0nOwGJfsj7nm9chVZ3ae7WQg3Uty0hHAkn5NSDCj3OOiN0py9Dr1l9vmRJpOOxg==} engines: {node: '>= 10'} os: [darwin] - solana-bankrun-darwin-x64@0.3.1: - resolution: {integrity: sha512-oCaxfHyt7RC3ZMldrh5AbKfy4EH3YRMl8h6fSlMZpxvjQx7nK7PxlRwMeflMnVdkKKp7U8WIDak1lilIPd3/lg==} + solana-bankrun-darwin-x64@0.4.0: + resolution: {integrity: sha512-LWjs5fsgHFtyr7YdJR6r0Ho5zrtzI6CY4wvwPXr8H2m3b4pZe6RLIZjQtabCav4cguc14G0K8yQB2PTMuGub8w==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - solana-bankrun-linux-x64-gnu@0.3.1: - resolution: {integrity: sha512-PfRFhr7igGFNt2Ecfdzh3li9eFPB3Xhmk0Eib17EFIB62YgNUg3ItRnQQFaf0spazFjjJLnglY1TRKTuYlgSVA==} + solana-bankrun-linux-x64-gnu@0.4.0: + resolution: {integrity: sha512-SrlVrb82UIxt21Zr/XZFHVV/h9zd2/nP25PMpLJVLD7Pgl2yhkhfi82xj3OjxoQqWe+zkBJ+uszA0EEKr67yNw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - solana-bankrun-linux-x64-musl@0.3.1: - resolution: {integrity: sha512-6r8i0NuXg3CGURql8ISMIUqhE7Hx/O7MlIworK4oN08jYrP0CXdLeB/hywNn7Z8d1NXrox/NpYUgvRm2yIzAsQ==} + solana-bankrun-linux-x64-musl@0.4.0: + resolution: {integrity: sha512-Nv328ZanmURdYfcLL+jwB1oMzX4ZzK57NwIcuJjGlf0XSNLq96EoaO5buEiUTo4Ls7MqqMyLbClHcrPE7/aKyA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - solana-bankrun@0.3.1: - resolution: {integrity: sha512-inRwON7fBU5lPC36HdEqPeDg15FXJYcf77+o0iz9amvkUMJepcwnRwEfTNyMVpVYdgjTOBW5vg+596/3fi1kGA==} + solana-bankrun@0.4.0: + resolution: {integrity: sha512-NMmXUipPBkt8NgnyNO3SCnPERP6xT/AMNMBooljGA3+rG6NN8lmXJsKeLqQTiFsDeWD74U++QM/DgcueSWvrIg==} engines: {node: '>= 10'} source-map-support@0.5.21: @@ -1041,6 +1053,14 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder + '@solana/spl-token-group@0.0.7(@solana/web3.js@1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)': + dependencies: + '@solana/codecs': 2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5) + '@solana/web3.js': 1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + - typescript + '@solana/spl-token-metadata@0.1.6(@solana/web3.js@1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)': dependencies: '@solana/codecs': 2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5) @@ -1063,6 +1083,21 @@ snapshots: - typescript - utf-8-validate + '@solana/spl-token@0.4.9(@solana/web3.js@1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)(utf-8-validate@5.0.10)': + dependencies: + '@solana/buffer-layout': 4.0.1 + '@solana/buffer-layout-utils': 0.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/spl-token-group': 0.0.7(@solana/web3.js@1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5) + '@solana/spl-token-metadata': 0.1.6(@solana/web3.js@1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5) + '@solana/web3.js': 1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) + buffer: 6.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - fastestsmallesttextencoderdecoder + - typescript + - utf-8-validate + '@solana/web3.js@1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 @@ -1097,7 +1132,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 12.20.55 + '@types/node': 22.8.0 '@types/fs-extra@11.0.4': dependencies: @@ -1125,7 +1160,7 @@ snapshots: '@types/ws@7.4.7': dependencies: - '@types/node': 12.20.55 + '@types/node': 22.8.0 '@types/ws@8.5.12': dependencies: @@ -1669,31 +1704,31 @@ snapshots: gopd: 1.0.1 has-property-descriptors: 1.0.2 - solana-bankrun-darwin-arm64@0.3.1: + solana-bankrun-darwin-arm64@0.4.0: optional: true - solana-bankrun-darwin-universal@0.3.1: + solana-bankrun-darwin-universal@0.4.0: optional: true - solana-bankrun-darwin-x64@0.3.1: + solana-bankrun-darwin-x64@0.4.0: optional: true - solana-bankrun-linux-x64-gnu@0.3.1: + solana-bankrun-linux-x64-gnu@0.4.0: optional: true - solana-bankrun-linux-x64-musl@0.3.1: + solana-bankrun-linux-x64-musl@0.4.0: optional: true - solana-bankrun@0.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): + solana-bankrun@0.4.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@solana/web3.js': 1.95.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) bs58: 4.0.1 optionalDependencies: - solana-bankrun-darwin-arm64: 0.3.1 - solana-bankrun-darwin-universal: 0.3.1 - solana-bankrun-darwin-x64: 0.3.1 - solana-bankrun-linux-x64-gnu: 0.3.1 - solana-bankrun-linux-x64-musl: 0.3.1 + solana-bankrun-darwin-arm64: 0.4.0 + solana-bankrun-darwin-universal: 0.4.0 + solana-bankrun-darwin-x64: 0.4.0 + solana-bankrun-linux-x64-gnu: 0.4.0 + solana-bankrun-linux-x64-musl: 0.4.0 transitivePeerDependencies: - bufferutil - encoding diff --git a/tokens/spl-token-minter/steel/program/src/lib.rs b/tokens/spl-token-minter/steel/program/src/lib.rs index 1562e9ea..337bf6cf 100644 --- a/tokens/spl-token-minter/steel/program/src/lib.rs +++ b/tokens/spl-token-minter/steel/program/src/lib.rs @@ -13,11 +13,11 @@ pub fn process_instruction( accounts: &[AccountInfo], data: &[u8], ) -> ProgramResult { - // Use crate::ID for program_id instead: + // Use `crate::ID` for program_id in your program + // // e.g parse_instruction(&crate::ID, program_id, data) - // using program_id for testing purposes // - let (ix, data) = parse_instruction(program_id, program_id, data)?; + let (ix, data) = parse_instruction(&crate::ID, program_id, data)?; match ix { SteelInstruction::CreateToken => CreateToken::process(accounts, data)?, diff --git a/tokens/spl-token-minter/steel/tests/test.ts b/tokens/spl-token-minter/steel/tests/test.ts index 67be5fec..306d02c5 100644 --- a/tokens/spl-token-minter/steel/tests/test.ts +++ b/tokens/spl-token-minter/steel/tests/test.ts @@ -7,8 +7,8 @@ import { BN } from 'bn.js'; import { start } from 'solana-bankrun'; import { CreateTokenArgs, MintToArgs, MyInstruction } from './instructions'; -describe('Create Tokens!', async () => { - const PROGRAM_ID = PublicKey.unique(); +describe('SPL Token Minter!', async () => { + const PROGRAM_ID = new PublicKey('z7msBPQHDJjTvdQRoEcKyENgXDhSRYeHieN1ZMTqo35'); const context = await start( [ { name: 'spl_token_minter_steel_program', programId: PROGRAM_ID }, @@ -68,7 +68,6 @@ describe('Create Tokens!', async () => { console.log('Success!'); console.log(` Mint Address: ${tokenMintKeypair.publicKey}`); - // console.log(` Tx Signature: ${sx}`); }); test('Mint some tokens to your wallet!', async () => { @@ -114,6 +113,5 @@ describe('Create Tokens!', async () => { console.log('Success!'); console.log(` ATA Address: ${associatedTokenAccountAddress}`); - // console.log(` Tx Signature: ${sx}`); }); });