forked from metaplex-foundation/metaplex-program-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add candy machine core program (metaplex-foundation#772)
* Add candy core program * Renamed directory to candy-machine-core * Update doc * Change program id * Fix deprecated name * Remove test folder from build * Remove extra padding from hidden section * Bump minor version * Updated IDL * Add information about the accout layout * Tweak formatting * Add instructions details * Fix mint instruction account list * Add features section * Add note formatting * Remove note formatting * Typo * removes anchor spl for compatability (metaplex-foundation#760) * Fix typos * Check if all config lines were added before mint * Add timestamp as a seed for the index * Remove unused dependency * Add CI * Better way to get items available * Update yarn.lock * Add test to yarn build * Fix imports * Build JS dependencies * Add candy machine core dependencies * Fix identation * Add build for auction_house and candy_machine * Building JS dependencies * Exporting minter module * Fix import path * More import path fix * Refactoring test files * Use local variable * Skip test during SDK build * Remove padding from values * Updated active project list * Add note about hidden settings * Update link to candy guard * remove rent * Version bump * Improve CI script * Fix JS dependencies * Change output directory * Fix files path * Update spl-token version * Downgrade spl-token * Fix dependencies * Change CI runner Co-authored-by: Austin Adams <[email protected]> Co-authored-by: Sammy <[email protected]>
- Loading branch information
1 parent
13c7b94
commit 03ad5bd
Showing
76 changed files
with
9,443 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Implicit dependencies | ||
# - actions/checkout@v2 | ||
# - ./.github/actions/install-linux-build-deps | ||
# - ./.github/actions/install-solana | ||
# - ./.github/actions/install-rust | ||
|
||
name: Build Candy Machine Core | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: build-candy-machine-core | ||
working-directory: ./candy-machine-core/program | ||
run: | | ||
cargo +${{ env.RUST_STABLE }} build-bpf --version | ||
cargo +${{ env.RUST_STABLE }} build-bpf --bpf-out-dir ../../test-programs/ | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Integration Candy Machine Core | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
SOLANA_VERSION: 1.10.35 | ||
RUST_TOOLCHAIN: stable | ||
|
||
jobs: | ||
changes: | ||
runs-on: buildjet-4vcpu-ubuntu-2004 | ||
# Set job outputs to values from filter step | ||
outputs: | ||
core: ${{ steps.filter.outputs.core }} | ||
package: ${{ steps.filter.outputs.package }} | ||
workflow: ${{ steps.filter.outputs.workflow }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# For pull requests it's not necessary to checkout the code | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: | | ||
core: | ||
- 'core/**' | ||
package: | ||
- 'candy-machine-core/**' | ||
workflow: | ||
- '.github/workflows/integration-candy-machine-core.yml' | ||
build-and-integration-test-candy-machine-core: | ||
runs-on: buildjet-4vcpu-ubuntu-2004 | ||
env: | ||
cache_id: program-candy-machine-core | ||
needs: changes | ||
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.package == 'true' || needs.changes.outputs.workflow == 'true' }} | ||
steps: | ||
# Setup Deps | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/install-linux-build-deps | ||
- uses: ./.github/actions/install-solana | ||
with: | ||
solana_version: ${{ env.SOLANA_VERSION }} | ||
- uses: ./.github/actions/install-rust | ||
with: | ||
toolchain: ${{ env.RUST_TOOLCHAIN }} | ||
|
||
# Restore Cache from previous build/test | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
./rust/target | ||
key: ${{ env.cache_id }}-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.RUSTC_HASH }} | ||
|
||
# Build Rust Program | ||
- uses: ./.github/actions/build-candy-machine-core | ||
- uses: ./.github/actions/build-token-metadata | ||
|
||
# Install JS SDK deps | ||
- uses: ./.github/actions/yarn-install-and-build | ||
with: | ||
cache_id: sdk-candy-machine-core | ||
working_dir: ./candy-machine-core/js | ||
build_token_metadata: true | ||
build_auction_house: true | ||
build_candy_machine: true | ||
|
||
# Start local validator | ||
- name: start-local-test-validator | ||
working-directory: ./candy-machine-core/js | ||
run: DEBUG=amman* yarn amman:start | ||
|
||
# Run integration test | ||
- name: run-integration-test | ||
id: run_integration_test | ||
working-directory: ./candy-machine-core/js | ||
run: DEBUG=mpl* yarn test | ||
|
||
# Stop local validator | ||
- name: stop-local-test-validator | ||
working-directory: ./candy-machine-core/js | ||
run: yarn amman:stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: SDK Candy Machine Core | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
changes: | ||
runs-on: ubuntu-latest | ||
# Set job outputs to values from filter step | ||
outputs: | ||
core: ${{ steps.filter.outputs.core }} | ||
package: ${{ steps.filter.outputs.package }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# For pull requests it's not necessary to checkout the code | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: | | ||
core: | ||
- 'core/js/**' | ||
package: | ||
- 'candy-machine-core/js/**' | ||
build-lint-and-test-candy-machine-core: | ||
needs: changes | ||
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.package == 'true' }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: ./.github/actions/yarn-install-and-verify | ||
with: | ||
cache_id: sdk-candy-machine-core | ||
working_dir: ./candy-machine-core/js | ||
skip_test: true | ||
build_token_metadata: true | ||
build_auction_house: true | ||
build_candy_machine: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,4 +72,4 @@ | |
"typedoc": "^0.23.10", | ||
"typescript": "^4.3.5" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use strict'; | ||
// @ts-check | ||
const base = require('../../.base-ammanrc.js'); | ||
const validator = { | ||
...base.validator, | ||
programs: [base.programs.candy_machine_core, base.programs.metadata], | ||
}; | ||
module.exports = {validator}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('../../.prettierrc'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// @ts-check | ||
const path = require('path'); | ||
const programDir = path.join(__dirname, '..', 'program'); | ||
const idlDir = path.join(__dirname, 'idl'); | ||
const sdkDir = path.join(__dirname, 'src', 'generated'); | ||
const binaryInstallDir = path.join(__dirname, '.crates'); | ||
|
||
module.exports = { | ||
idlGenerator: 'anchor', | ||
programName: 'candy_machine_core', | ||
programId: 'CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR', | ||
idlDir, | ||
sdkDir, | ||
binaryInstallDir, | ||
programDir, | ||
}; |
Oops, something went wrong.