Skip to content

Commit

Permalink
Rename.
Browse files Browse the repository at this point in the history
  • Loading branch information
blockiosaurus committed Jul 30, 2024
1 parent 1c3fe65 commit a945020
Show file tree
Hide file tree
Showing 45 changed files with 538 additions and 302 deletions.
2 changes: 1 addition & 1 deletion .github/.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CARGO_TERM_COLOR=always
NODE_VERSION=16.x
PROGRAMS=["mpl-project-name"]
PROGRAMS=["solana-serialization-benchmark"]
RUST_VERSION=1.70.0
SOLANA_VERSION=1.16.18
COMMIT_USER_NAME=github-actions
Expand Down
2 changes: 1 addition & 1 deletion .github/file-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ program_common: &program_common

mpl_project_name_program: &mpl_project_name_program
- *program_common
- "programs/mpl-project-name/**"
- "programs/solana-serialization-benchmark/**"

programs: &programs
- *mpl_project_name_program
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ dist
.amman
.crates
.bin
clients/js/output.json
clients/js/output.json
BENCHVr3SC7dVDMtKVpwctjFNPBMrqvXn9JVACJg3KEb.json
benchBx2iwpzLnwvBTUdSLx3pNw2bxYCyQGWeU5fPbo.json
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Mpl Project Name
# Contributing to Solana Serialization Benchmark

This is a quick guide to help you contribute to Mpl Project Name.
This is a quick guide to help you contribute to Solana Serialization Benchmark.

## Getting started

Expand All @@ -16,8 +16,8 @@ You will then have access to the following commands.
- `pnpm programs:test` - Test all programs.
- `pnpm programs:debug` - Test all programs with logs enabled.
- `pnpm programs:clean` - Clean all built and fetched programs.
- `pnpm clients:rust:test` - Run the Rust client tests.
- `pnpm clients:js:test` - Run the JS client tests.
- `pnpm clients:rust:test` - Run the Rust client tests.
- `pnpm clients:js:test` - Run the JS client tests.
- `pnpm generate` - Shortcut for `pnpm generate:idls && pnpm generate:clients`.
- `pnpm generate:idls` - Generate IDLs for all programs, as configured in the `configs/shank.cjs` file.
- `pnpm generate:clients` - Generate clients using Kinobi, as configured in the `configs/kinobi.cjs` file.
Expand Down
56 changes: 28 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[workspace]
members = ["clients/rust", "programs/solana-serialization-benchmark"]
resolver = "2"
members = [
"clients/rust",
"programs/mpl-project-name"
]
22 changes: 0 additions & 22 deletions PROJECT_README.md

This file was deleted.

58 changes: 22 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,22 @@
<h1 align="center">
Solana Project Template
</h1>
<p align="center">
A template for vanilla Solana programs and their clients.
</p>
<p align="center">
<img width="600" alt="Solana Project Template" src="https://github.com/metaplex-foundation/solana-project-template/assets/729235/aebf053a-d6fa-440b-9766-8957e843ec86" />
</p>
<p align="center">
<a href="https://github.com/metaplex-foundation/solana-project-template/actions/workflows/main.yml"><img src="https://img.shields.io/github/actions/workflow/status/metaplex-foundation/solana-project-template/main.yml?logo=GitHub" /></a>
</p>

## Features

- **Generate IDLs** using [Shank](https://github.com/metaplex-foundation/shank)
- **Generate clients** for one or more programs using [Kinobi](https://github.com/metaplex-foundation/kinobi)
- Configure **local validators** using [Amman](https://github.com/metaplex-foundation/amman)
- **Build, test and lint** programs and clients using GitHub Actions.
- **Publish** your [Umi](https://github.com/metaplex-foundation/umi) JavaScript client and its TypeScript documentation by dispatching a GitHub workflow.
- **Publish** your Rust client SDK to [crates.io](https://crates.io) by dispatching a GitHub workflow.

## Getting started

1. [Use this template](https://github.com/new?template_name=solana-project-template&template_owner=metaplex-foundation) to create a new repository.
2. Open the `init.sh` script and update the following variables.
```sh
NAME="mpl-project-name"
DESCRIPTION="My project description"
PUBLIC_KEY="MyProgram1111111111111111111111111111111111"
```
3. Run the `init.sh` script to initialize the project. This will find/replace the variable above, rename some files/folders, update the README and, finally, remove the `init.sh` script.
```sh
./init.sh
```
4. [Read the `CONTRIBUTING.md` file](./CONTRIBUTING.md) to learn more about how to use the project.
# Solana Serialization Benchmark

Benchmarks for rust serialization frameworks, inspired by https://github.com/djkoloski/rust_serialization_benchmark.

## Programs

This project contains the following programs:

- [Solana Serialization Benchmark](./programs/solana-serialization-benchmark/README.md) `BENCHVr3SC7dVDMtKVpwctjFNPBMrqvXn9JVACJg3KEb`

You will need a Rust version compatible with BPF to compile the program, currently we recommend using Rust 1.68.0.

## Clients

This project contains the following clients:

- [JavaScript](./clients/js/README.md)
- [Rust](./clients/rust/README.md)

## Contributing

Check out the [Contributing Guide](./CONTRIBUTING.md) the learn more about how to contribute to this project.
4 changes: 2 additions & 2 deletions clients/js/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to the JavaScript client

This is a quick guide to help you contribute to the JavaScript client of Mpl Project Name.
This is a quick guide to help you contribute to the JavaScript client of Solana Serialization Benchmark.

## Getting started

Expand Down Expand Up @@ -49,7 +49,7 @@ To publish JavaScript clients using GitHub actions, we first need the following
Then, we'll need to create a new GitHub environment called `js-client-documentation` for the generated documentation of the JavaScript client. We can then select the `main` branch only and add the following secret variable to this specific environment.

- `VERCEL_PROJECT_ID` — The ID of the Vercel project you want to deploy to.
The convention for Metaplex is to create a new Vercel project named `mpl-project-name-js-docs` with the following deployment settings:
The convention for Metaplex is to create a new Vercel project named `solana-serialization-benchmark-js-docs` with the following deployment settings:

- Build Command: `pnpm run build:docs`
- Output Directory: `docs`
Expand Down
8 changes: 4 additions & 4 deletions clients/js/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# JavaScript client for Mpl Project Name
# JavaScript client for Solana Serialization Benchmark

A Umi-compatible JavaScript library for the project.

Expand All @@ -7,15 +7,15 @@ A Umi-compatible JavaScript library for the project.
1. First, if you're not already using Umi, [follow these instructions to install the Umi framework](https://github.com/metaplex-foundation/umi/blob/main/docs/installation.md).
2. Next, install this library using the package manager of your choice.
```sh
npm install @metaplex-foundation/mpl-project-name
npm install @metaplex-foundation/solana-serialization-benchmark
```
2. Finally, register the library with your Umi instance like so.
```ts
import { mplProjectName } from '@metaplex-foundation/mpl-project-name';
import { mplProjectName } from '@metaplex-foundation/solana-serialization-benchmark';
umi.use(mplProjectName());
```

You can learn more about this library's API by reading its generated [TypeDoc documentation](https://mpl-project-name-js-docs.vercel.app).
You can learn more about this library's API by reading its generated [TypeDoc documentation](https://solana-serialization-benchmark-js-docs.vercel.app).

## Setting up Benchmarks
The GitHub workflow will automatically run benchmarks on pushes to the `main` branch, however it needs a gh-pages branch to deploy the hosted graph website to. Run the commands below to setup the gh-pages branch.
Expand Down
6 changes: 3 additions & 3 deletions clients/js/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@metaplex-foundation/mpl-project-name",
"name": "@metaplex-foundation/solana-serialization-benchmark",
"version": "0.1.0",
"description": "My project description",
"main": "dist/src/index.js",
Expand All @@ -22,7 +22,7 @@
"registry": "https://registry.npmjs.org"
},
"homepage": "https://metaplex.com",
"repository": "https://github.com/metaplex-foundation/mpl-project-name.git",
"repository": "https://github.com/metaplex-foundation/solana-serialization-benchmark.git",
"author": "Metaplex Maintainers <[email protected]>",
"license": "Apache-2.0",
"dependencies": {
Expand Down Expand Up @@ -63,4 +63,4 @@
}
},
"packageManager": "[email protected]"
}
}
2 changes: 1 addition & 1 deletion clients/js/src/generated/accounts/myAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function getMyAccountGpaBuilder(
context: Pick<Context, 'rpc' | 'programs'>
) {
const programId = context.programs.getPublicKey(
'mplProjectName',
'solanaSerializationBenchmark',
'MyProgram1111111111111111111111111111111111'
);
return gpaBuilder(context, programId)
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/accounts/myPdaAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function getMyPdaAccountGpaBuilder(
context: Pick<Context, 'rpc' | 'programs'>
) {
const programId = context.programs.getPublicKey(
'mplProjectName',
'solanaSerializationBenchmark',
'MyProgram1111111111111111111111111111111111'
);
return gpaBuilder(context, programId)
Expand Down Expand Up @@ -145,7 +145,7 @@ export function findMyPdaAccountPda(
}
): Pda {
const programId = context.programs.getPublicKey(
'mplProjectName',
'solanaSerializationBenchmark',
'MyProgram1111111111111111111111111111111111'
);
return context.eddsa.findPda(programId, [
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/errors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
* @see https://github.com/metaplex-foundation/kinobi
*/

export * from './mplProjectName';
export * from './solanaSerializationBenchmark';
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ nameToErrorMap.set('SerializationError', SerializationErrorError);
* Attempts to resolve a custom program error from the provided error code.
* @category Errors
*/
export function getMplProjectNameErrorFromCode(
export function getSolanaSerializationBenchmarkErrorFromCode(
code: number,
program: Program,
cause?: Error
Expand All @@ -71,7 +71,7 @@ export function getMplProjectNameErrorFromCode(
* Attempts to resolve a custom program error from the provided error name, i.e. 'Unauthorized'.
* @category Errors
*/
export function getMplProjectNameErrorFromName(
export function getSolanaSerializationBenchmarkErrorFromName(
name: string,
program: Program,
cause?: Error
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/instructions/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function create(
): TransactionBuilder {
// Program ID.
const programId = context.programs.getPublicKey(
'mplProjectName',
'solanaSerializationBenchmark',
'MyProgram1111111111111111111111111111111111'
);

Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/programs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
* @see https://github.com/metaplex-foundation/kinobi
*/

export * from './mplProjectName';
export * from './solanaSerializationBenchmark';
55 changes: 0 additions & 55 deletions clients/js/src/generated/programs/mplProjectName.ts

This file was deleted.

Loading

0 comments on commit a945020

Please sign in to comment.