4 releases (2 breaking)

0.4.0 Jul 13, 2023
0.3.0 Oct 12, 2022
0.2.3 Jul 1, 2022
0.2.1 Jun 23, 2022

#2223 in Magic Beans

Custom license

79KB
2K SLoC

Metaplex Program Library

Metaplex smart contracts and SDK.

Program Tests Integration Tests SDK Tests

Metaplex Contracts

Name Rust Crate npm Package
Auction House Crate NPM
Auctioneer Crate NPM
Bubblegum Crate NPM
Candy Machine Core Crate NPM
Candy Machine Crate NPM
Fixed Price Sale Crate NPM
Gumdrop Crate NPM
Hydra Crate NPM
NFT Packs Crate NPM
Token Entangler Crate NPM
Token Metadata Crate NPM

Development

Setting up Rust Tests

Run the build.sh script with the name of the program to build the shared object and put it in a directory called test-programs in the root of the project.

E.g.:

./build.sh auction-house

Running with all builds all programs.

Versioning and Publishing Packages

Smart contract SDK packages are versioned independently since a contract isn't necessarily coupled to other contracts.

We use the following (pre|post)(version|publish) npm scripts to manage related checks, tagging, committing and pushing the version bump.

  • preversion: ensures that the package builds and its tests pass
  • postversion: adds and commits the version bump and adds a tag indicating package name and new version, i.e. @metaplex-foundation/mp-core@v0.0.1
  • prepublishOnly: ensures that the package builds and its tests pass again (just to be really sure)
  • postpublish: pushes the committed change and new tag to GitHub

In order to version and then publish a package just run the following commands from the folder of the package you want to update:

  • npm version <patch|minor|major>
  • npm publish

As you note if version + publish succeeds the scripts end up pushing those updates to the master branch. Therefore, please ensure to be on and up to date master branch before running them. Please don't ever publish from another branch but only from the main one with only PR approved changes merged.

Rust Crates

Package Link Version
Auction House mpl-auction-house Crate
Auctioneer mpl-auctioneer Crate
Bubblegum mpl-bubblegum Crate
Candy Machine Core mpl-candy-machine-core Crate
Testing Utils mpl-testing-utils Crate
Utils mpl-utils Crate
Fixed Price Sale mpl-fixed-price-sale Crate
Gumdrop mpl-gumdrop Crate
Hydra mpl-hydra Crate
NFT Packs mpl-nft-packs Crate
Token Entangler mpl-token-entangler Crate
Token Metadata mpl-token-metadata Crate

npm Packages

Package Link Version
Auction House mpl-auction-house NPM
Auctioneer mpl-auctioneer NPM
Bubblegum mpl-bubblegum NPM
Candy Machine Core mpl-candy-machine-core NPM
Candy Machine mpl-candy-machine NPM
Fixed Price Sale mpl-fixed-price-sale NPM
Gumdrop mpl-gumdrop NPM
Hydra mpl-hydra NPM
NFT Packs mpl-nft-packs NPM
Token Entangler mpl-token-entangler NPM
Token Metadata mpl-token-metadata NPM

Reporting security issues

To report a security issue, please follow the guidance on the SECURITY page.

License

The Rust/Cargo programs are licensed under the “Apache-style” Metaplex(TM) NFT Open Source License and the JS/TS client libraries are licensed under either the MIT or the Apache licenses.

Dependencies

~30–41MB
~680K SLoC