From 4ab1292942417551d8ee43d2c24a3265cb41aee8 Mon Sep 17 00:00:00 2001 From: blockiosaurus Date: Fri, 2 Feb 2024 10:20:54 -0500 Subject: [PATCH] Renaming for consistency for other projects. --- .github/.env | 2 +- .github/file-filters.yml | 2 +- .vscode/settings.json | 10 +++++----- README.md | 9 +++++---- configs/kinobi.cjs | 2 +- configs/shank.cjs | 4 ++-- ...l_inscription.json => mpl_inscription_program.json} | 2 +- programs/{mpl-inscription => inscription}/Cargo.lock | 2 +- programs/{mpl-inscription => inscription}/Cargo.toml | 6 +++--- programs/{mpl-inscription => inscription}/README.md | 0 programs/{mpl-inscription => inscription}/rustfmt.toml | 0 .../{mpl-inscription => inscription}/src/entrypoint.rs | 0 programs/{mpl-inscription => inscription}/src/error.rs | 0 .../src/instruction/mod.rs | 0 programs/{mpl-inscription => inscription}/src/lib.rs | 0 .../src/processor/add_authority.rs | 0 .../src/processor/allocate.rs | 0 .../src/processor/clear_data.rs | 0 .../src/processor/close.rs | 0 .../src/processor/create_shard.rs | 0 .../src/processor/initialize.rs | 0 .../src/processor/initialize_associated_inscription.rs | 0 .../src/processor/initialize_from_mint.rs | 0 .../src/processor/mod.rs | 0 .../src/processor/remove_authority.rs | 0 .../src/processor/set_mint.rs | 0 .../src/processor/write_data.rs | 0 programs/{mpl-inscription => inscription}/src/state.rs | 0 28 files changed, 20 insertions(+), 19 deletions(-) rename idls/{mpl_inscription.json => mpl_inscription_program.json} (99%) rename programs/{mpl-inscription => inscription}/Cargo.lock (99%) rename programs/{mpl-inscription => inscription}/Cargo.toml (68%) rename programs/{mpl-inscription => inscription}/README.md (100%) rename programs/{mpl-inscription => inscription}/rustfmt.toml (100%) rename programs/{mpl-inscription => inscription}/src/entrypoint.rs (100%) rename programs/{mpl-inscription => inscription}/src/error.rs (100%) rename programs/{mpl-inscription => inscription}/src/instruction/mod.rs (100%) rename programs/{mpl-inscription => inscription}/src/lib.rs (100%) rename programs/{mpl-inscription => inscription}/src/processor/add_authority.rs (100%) rename programs/{mpl-inscription => inscription}/src/processor/allocate.rs (100%) rename programs/{mpl-inscription => inscription}/src/processor/clear_data.rs (100%) rename programs/{mpl-inscription => inscription}/src/processor/close.rs (100%) rename programs/{mpl-inscription => inscription}/src/processor/create_shard.rs (100%) rename programs/{mpl-inscription => inscription}/src/processor/initialize.rs (100%) rename programs/{mpl-inscription => inscription}/src/processor/initialize_associated_inscription.rs (100%) rename programs/{mpl-inscription => inscription}/src/processor/initialize_from_mint.rs (100%) rename programs/{mpl-inscription => inscription}/src/processor/mod.rs (100%) rename programs/{mpl-inscription => inscription}/src/processor/remove_authority.rs (100%) rename programs/{mpl-inscription => inscription}/src/processor/set_mint.rs (100%) rename programs/{mpl-inscription => inscription}/src/processor/write_data.rs (100%) rename programs/{mpl-inscription => inscription}/src/state.rs (100%) diff --git a/.github/.env b/.github/.env index add708f..5a9856b 100644 --- a/.github/.env +++ b/.github/.env @@ -1,6 +1,6 @@ CARGO_TERM_COLOR=always NODE_VERSION=16.x -PROGRAMS=["mpl-inscription"] +PROGRAMS=["inscription"] RUST_VERSION=1.70.0 SOLANA_VERSION=1.16.18 COMMIT_USER_NAME=github-actions diff --git a/.github/file-filters.yml b/.github/file-filters.yml index 21c1202..d5b1cf4 100644 --- a/.github/file-filters.yml +++ b/.github/file-filters.yml @@ -13,7 +13,7 @@ program_common: &program_common mpl_inscription: &mpl_inscription - *program_common - - "programs/mpl-inscription/**" + - "programs/inscription/**" programs: &programs - *mpl_inscription diff --git a/.vscode/settings.json b/.vscode/settings.json index dcece14..d4a7c6f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { - "rust-analyzer.linkedProjects": [ - "./clients/rust/Cargo.toml", - "./programs/mpl-inscription/Cargo.toml", - ] -} \ No newline at end of file + "rust-analyzer.linkedProjects": [ + "./clients/rust/Cargo.toml", + "./programs/inscription/Cargo.toml" + ] +} diff --git a/README.md b/README.md index 5949180..6c46be9 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,13 @@ Inscribing is the practice of treating the Solana blockchain as a form of data storage, much like Arweave or IPFS. While other data storage providers provide their own immutability and data integrity guarantees, there is demand for data directly on the native chain of the underlying NFT. Features such as dynamic metadata and images, on-chain attribute orders, and trait locked smart contracts all become possible with inscribed metadata. Metaplex inscriptions have two operating modes: -* Metadata inscribing -* Direct data storage + +- Metadata inscribing +- Direct data storage In both modes binary data of any format can be directly written to the chain through the Metaplex Inscription program. In addition, the Metaplex SDKs provide direct support for inscribing schemas commonly used for NFTs (i.e. JSON and Image formats). -The Metadata inscribing method creates a PDA attached to a mint account, the same way Metadata is attached to a token mint. The JSON and image data of the NFT can then be written directly to the chain in the PDA. This method provides a backup of the NFT data in the event that current data storage providers should ever go down and means the asset is “fully on Solana.” +The Metadata inscribing method creates a PDA attached to a mint account, the same way Metadata is attached to a token mint. The JSON and image data of the NFT can then be written directly to the chain in the PDA. This method provides a backup of the NFT data in the event that current data storage providers should ever go down and means the asset is “fully on Solana.” Mint inscriptions also include a ranking, which offers a FCFS rarity claim when inscribing an NFT. Using a sharded counter to prevent resource contention, the Mint inscriptions are globally ranked based on their minting order. The direct data storage can be used as a direct alternative to providers like Arweave and IPFS, rather than as a backup. JSON and Image data can be written directly to the chain. One small caveat of this method is that a gateway is required to enable maximum ecosystem support, much like ar.io, arweave.net, gateway.ipfs.io, etc. @@ -19,7 +20,7 @@ The Metaplex Inscription program is queued up for a full audit to prevent any se This project contains the following programs: -- [Mpl Inscription](./programs/mpl-inscription/README.md) `1NSCRfGeyo7wPUazGbaPBUsTM49e1k2aXewHGARfzSo` +- [Mpl Inscription](./programs/inscription/README.md) `1NSCRfGeyo7wPUazGbaPBUsTM49e1k2aXewHGARfzSo` You will need a Rust version compatible with BPF to compile the program, currently we recommend using Rust 1.68.0. diff --git a/configs/kinobi.cjs b/configs/kinobi.cjs index db6eff7..397f181 100755 --- a/configs/kinobi.cjs +++ b/configs/kinobi.cjs @@ -6,7 +6,7 @@ const clientDir = path.join(__dirname, "..", "clients"); const idlDir = path.join(__dirname, "..", "idls"); // Instanciate Kinobi. -const kinobi = k.createFromIdls([path.join(idlDir, "mpl_inscription.json")]); +const kinobi = k.createFromIdls([path.join(idlDir, "mpl_inscription_program.json")]); // Update programs. kinobi.update( diff --git a/configs/shank.cjs b/configs/shank.cjs index 7b4cc33..585a91d 100644 --- a/configs/shank.cjs +++ b/configs/shank.cjs @@ -7,9 +7,9 @@ const programDir = path.join(__dirname, "..", "programs"); generateIdl({ generator: "shank", - programName: "mpl_inscription", + programName: "mpl_inscription_program", programId: "1NSCRfGeyo7wPUazGbaPBUsTM49e1k2aXewHGARfzSo", idlDir, binaryInstallDir, - programDir: path.join(programDir, "mpl-inscription"), + programDir: path.join(programDir, "inscription"), }); diff --git a/idls/mpl_inscription.json b/idls/mpl_inscription_program.json similarity index 99% rename from idls/mpl_inscription.json rename to idls/mpl_inscription_program.json index 85513e6..7f797a3 100644 --- a/idls/mpl_inscription.json +++ b/idls/mpl_inscription_program.json @@ -1,6 +1,6 @@ { "version": "0.1.0", - "name": "mpl_inscription", + "name": "mpl_inscription_program", "instructions": [ { "name": "Initialize", diff --git a/programs/mpl-inscription/Cargo.lock b/programs/inscription/Cargo.lock similarity index 99% rename from programs/mpl-inscription/Cargo.lock rename to programs/inscription/Cargo.lock index 10a31f9..bf28686 100644 --- a/programs/mpl-inscription/Cargo.lock +++ b/programs/inscription/Cargo.lock @@ -1035,7 +1035,7 @@ dependencies = [ ] [[package]] -name = "mpl-inscription" +name = "mpl-inscription-program" version = "0.1.0" dependencies = [ "borsh 0.10.3", diff --git a/programs/mpl-inscription/Cargo.toml b/programs/inscription/Cargo.toml similarity index 68% rename from programs/mpl-inscription/Cargo.toml rename to programs/inscription/Cargo.toml index e4bee33..76270f4 100644 --- a/programs/mpl-inscription/Cargo.toml +++ b/programs/inscription/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "mpl-inscription" +name = "mpl-inscription-program" version = "0.1.0" edition = "2021" readme = "./README.md" @@ -17,6 +17,6 @@ num-traits = "^0.2" solana-program = "~1.16" thiserror = "^1.0" mpl-utils = "0.3.1" -serde_json = { version = "1.0.108", features = ["std"]} +serde_json = { version = "1.0.108", features = ["std"] } mpl-token-metadata = "3.2.3" -spl-token = { version = "4.0.0", features = ["no-entrypoint"] } \ No newline at end of file +spl-token = { version = "4.0.0", features = ["no-entrypoint"] } diff --git a/programs/mpl-inscription/README.md b/programs/inscription/README.md similarity index 100% rename from programs/mpl-inscription/README.md rename to programs/inscription/README.md diff --git a/programs/mpl-inscription/rustfmt.toml b/programs/inscription/rustfmt.toml similarity index 100% rename from programs/mpl-inscription/rustfmt.toml rename to programs/inscription/rustfmt.toml diff --git a/programs/mpl-inscription/src/entrypoint.rs b/programs/inscription/src/entrypoint.rs similarity index 100% rename from programs/mpl-inscription/src/entrypoint.rs rename to programs/inscription/src/entrypoint.rs diff --git a/programs/mpl-inscription/src/error.rs b/programs/inscription/src/error.rs similarity index 100% rename from programs/mpl-inscription/src/error.rs rename to programs/inscription/src/error.rs diff --git a/programs/mpl-inscription/src/instruction/mod.rs b/programs/inscription/src/instruction/mod.rs similarity index 100% rename from programs/mpl-inscription/src/instruction/mod.rs rename to programs/inscription/src/instruction/mod.rs diff --git a/programs/mpl-inscription/src/lib.rs b/programs/inscription/src/lib.rs similarity index 100% rename from programs/mpl-inscription/src/lib.rs rename to programs/inscription/src/lib.rs diff --git a/programs/mpl-inscription/src/processor/add_authority.rs b/programs/inscription/src/processor/add_authority.rs similarity index 100% rename from programs/mpl-inscription/src/processor/add_authority.rs rename to programs/inscription/src/processor/add_authority.rs diff --git a/programs/mpl-inscription/src/processor/allocate.rs b/programs/inscription/src/processor/allocate.rs similarity index 100% rename from programs/mpl-inscription/src/processor/allocate.rs rename to programs/inscription/src/processor/allocate.rs diff --git a/programs/mpl-inscription/src/processor/clear_data.rs b/programs/inscription/src/processor/clear_data.rs similarity index 100% rename from programs/mpl-inscription/src/processor/clear_data.rs rename to programs/inscription/src/processor/clear_data.rs diff --git a/programs/mpl-inscription/src/processor/close.rs b/programs/inscription/src/processor/close.rs similarity index 100% rename from programs/mpl-inscription/src/processor/close.rs rename to programs/inscription/src/processor/close.rs diff --git a/programs/mpl-inscription/src/processor/create_shard.rs b/programs/inscription/src/processor/create_shard.rs similarity index 100% rename from programs/mpl-inscription/src/processor/create_shard.rs rename to programs/inscription/src/processor/create_shard.rs diff --git a/programs/mpl-inscription/src/processor/initialize.rs b/programs/inscription/src/processor/initialize.rs similarity index 100% rename from programs/mpl-inscription/src/processor/initialize.rs rename to programs/inscription/src/processor/initialize.rs diff --git a/programs/mpl-inscription/src/processor/initialize_associated_inscription.rs b/programs/inscription/src/processor/initialize_associated_inscription.rs similarity index 100% rename from programs/mpl-inscription/src/processor/initialize_associated_inscription.rs rename to programs/inscription/src/processor/initialize_associated_inscription.rs diff --git a/programs/mpl-inscription/src/processor/initialize_from_mint.rs b/programs/inscription/src/processor/initialize_from_mint.rs similarity index 100% rename from programs/mpl-inscription/src/processor/initialize_from_mint.rs rename to programs/inscription/src/processor/initialize_from_mint.rs diff --git a/programs/mpl-inscription/src/processor/mod.rs b/programs/inscription/src/processor/mod.rs similarity index 100% rename from programs/mpl-inscription/src/processor/mod.rs rename to programs/inscription/src/processor/mod.rs diff --git a/programs/mpl-inscription/src/processor/remove_authority.rs b/programs/inscription/src/processor/remove_authority.rs similarity index 100% rename from programs/mpl-inscription/src/processor/remove_authority.rs rename to programs/inscription/src/processor/remove_authority.rs diff --git a/programs/mpl-inscription/src/processor/set_mint.rs b/programs/inscription/src/processor/set_mint.rs similarity index 100% rename from programs/mpl-inscription/src/processor/set_mint.rs rename to programs/inscription/src/processor/set_mint.rs diff --git a/programs/mpl-inscription/src/processor/write_data.rs b/programs/inscription/src/processor/write_data.rs similarity index 100% rename from programs/mpl-inscription/src/processor/write_data.rs rename to programs/inscription/src/processor/write_data.rs diff --git a/programs/mpl-inscription/src/state.rs b/programs/inscription/src/state.rs similarity index 100% rename from programs/mpl-inscription/src/state.rs rename to programs/inscription/src/state.rs