Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream #2

Open
wants to merge 67 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
02e7cb3
feat: add end auction transaction (#64)
kurpav Nov 22, 2021
3bd2381
feat: add burn token action (#72)
kurpav Nov 23, 2021
248b61b
feat: add `Metadata.findDataByOwner` (#68)
solberenson Nov 23, 2021
546fc1c
feat: expose action.shared.prepareTokenAccountAndMintTx (#74)
lexich Nov 26, 2021
8d4cab8
chore(release): set `package.json` to 4.4.0 [skip ci]
semantic-release-bot Nov 26, 2021
86de6a8
refactor: move test network string to shared constant (#75)
kurpav Nov 26, 2021
c3e03b4
chore(release): set `package.json` to 4.4.1 [skip ci]
semantic-release-bot Nov 26, 2021
823e141
fix: restore externalPriceAccount argument in UpdateExternalPriceAcco…
dkchv Nov 29, 2021
f1ccb0a
chore(release): set `package.json` to 4.4.2 [skip ci]
semantic-release-bot Nov 29, 2021
c9d5524
feat: create vault + test (#82)
b2kdaman Nov 30, 2021
b5f9d7c
feat: add send token action (#81)
kurpav Dec 1, 2021
2992efe
chore(release): set `package.json` to 4.5.0 [skip ci]
semantic-release-bot Dec 1, 2021
5194774
fix: vault scheme (#87)
dkchv Dec 2, 2021
22247bf
chore(release): set `package.json` to 4.5.1 [skip ci]
semantic-release-bot Dec 2, 2021
e2f8c43
feat: close vault action (#86)
b2kdaman Dec 2, 2021
ac808ad
fix: createAuctionV2 scheme (#88)
dkchv Dec 2, 2021
4111c27
chore(release): set `package.json` to 4.6.0 [skip ci]
semantic-release-bot Dec 2, 2021
5d16fc7
feat: create external pricing account action (#89)
b2kdaman Dec 3, 2021
34dab01
chore(release): set `package.json` to 4.7.0 [skip ci]
semantic-release-bot Dec 3, 2021
0cea78d
feat: setStoreV2 with StoreConfig (#90)
exromany Dec 6, 2021
02712f8
chore(release): set `package.json` to 4.8.0 [skip ci]
semantic-release-bot Dec 6, 2021
fd4a3b3
feat: add redeem printing v2 action and update instant sale (#91)
kurpav Dec 6, 2021
a844efe
chore(release): set `package.json` to 4.9.0 [skip ci]
semantic-release-bot Dec 6, 2021
53e6401
chore: use mpl smart contracts packages (#92)
thlorenz Dec 7, 2021
da86e98
chore: add stability to readme (#95)
aheckmann Dec 8, 2021
479b98f
chore: automatically label new PRs and issues (#97)
aheckmann Dec 9, 2021
f9ac129
chore: specify correct label to auto-apply (#100)
aheckmann Dec 9, 2021
bbb50b7
feat: add redeem participation bid action (#98)
kurpav Dec 10, 2021
3421d38
chore(release): set `package.json` to 4.10.0 [skip ci]
semantic-release-bot Dec 10, 2021
5e53560
chore: switch to auto-labeler (#104)
aheckmann Dec 10, 2021
c0c1f54
Update TODO.md
aheckmann Dec 11, 2021
4ef9783
Update TODO.md
aheckmann Dec 15, 2021
a6c3bd3
Update TODO.md
aheckmann Dec 16, 2021
439aaf4
fix: lint errors (#120)
aheckmann Dec 16, 2021
70373a9
chore(release): set `package.json` to 4.10.1 [skip ci]
semantic-release-bot Dec 16, 2021
3ca7ded
test: add test environment to run tests against local solana (#93)
olgkv Dec 28, 2021
5bde6d4
chore: update release test command (#125)
kurpav Dec 28, 2021
cb997e6
chore: update doc link (#126)
kurpav Dec 28, 2021
292d5c7
chore: adds workspace support and yarn 3 (#127)
austbot Dec 29, 2021
d5c8983
feat: port addTokensToVault action to SDK (#128)
tbiedukhin Jan 5, 2022
715d1d4
feat: port makeAuction action (#131)
tbiedukhin Jan 5, 2022
7239ef7
chore(release): set `package.json` to 4.11.0 [skip ci]
semantic-release-bot Jan 5, 2022
576a026
fix(semantic-release): update yarn.lock (#134)
aheckmann Jan 6, 2022
9da32fe
chore(release): set `package.json` to 4.11.1 [skip ci]
semantic-release-bot Jan 6, 2022
22fd608
fix(npm install): see #135 (#136)
aheckmann Jan 7, 2022
2519040
chore(release): set `package.json` to 4.11.2 [skip ci]
semantic-release-bot Jan 7, 2022
f4e9211
Fix program exports (#138)
aheckmann Jan 11, 2022
b6445fc
chore: trigger release
aheckmann Jan 11, 2022
fde2a8b
fix(trigger release): see #136
aheckmann Jan 11, 2022
2390c45
chore(release): set `package.json` to 4.11.3 [skip ci]
semantic-release-bot Jan 11, 2022
bae26fd
CI: support local MPL program changes in integration tests (#142)
aheckmann Jan 12, 2022
4b933d4
fix: add back Optional type import (#144)
zkhalapyan Jan 13, 2022
4c691f2
chore(release): set `package.json` to 4.11.4 [skip ci]
semantic-release-bot Jan 13, 2022
aaa33fa
fix: utility exports (#146)
aheckmann Jan 13, 2022
c3b7d1d
Update README.md
aheckmann Jan 13, 2022
a618072
chore(release): set `package.json` to 4.11.5 [skip ci]
semantic-release-bot Jan 13, 2022
7839353
fix: allow Master Edition max supply to be 0 (#147)
aheckmann Jan 17, 2022
809b0f4
chore(release): set `package.json` to 4.11.6 [skip ci]
semantic-release-bot Jan 17, 2022
057420f
docs: add doc generator (#150)
aheckmann Jan 19, 2022
897e756
fix: github workflow for API docs publishing (#151)
aheckmann Jan 19, 2022
f1324ca
chore(release): set `package.json` to 4.11.7 [skip ci]
semantic-release-bot Jan 19, 2022
0abc584
no-release: add Pull Request Template (#153)
aheckmann Jan 20, 2022
87ece1c
feat: latest token-metadata features (#168)
aheckmann Jan 27, 2022
5e2c1ef
chore(release): set `package.json` to 4.12.0 [skip ci]
semantic-release-bot Jan 27, 2022
41e997e
Update README.md (#166)
aheckmann Jan 27, 2022
a4274ec
docs: initial documentation (#156)
etodanik Jan 28, 2022
7e4a3ff
Update README.md
lorisleiva Jun 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .ammanrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// @ts-check
'use strict';
const { tmpdir } = require('os');
const path = require('path');
const { LOCALHOST, tmpLedgerDir } = require('@metaplex-foundation/amman');

const isLocal = process.env.LOCAL_MPL === '1';

const localDeployDir = isLocal ?
path.resolve(process.cwd(), '../metaplex-program-library', 'target', 'deploy') :
path.join(tmpdir(), 'test', 'rust', 'target', 'deploy');

const programIds = {
metadata: 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s',
vault: 'vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn',
auction: 'auctxRXPeJoc4817jDhf4HbjnhEcr1cCXenosMhK5R8',
metaplex: 'p1exdMJcjVao65QdewkaZRUnU6VPSXhus9n2GzWfh98',
};

function localDeployPath(programName) {
return path.join(localDeployDir, `${programName}.so`);
}
const programs = [
{
programId: programIds.metadata,
deployPath: localDeployPath('mpl_token_metadata'),
},
{
programId: programIds.vault,
deployPath: localDeployPath('mpl_token_vault'),
},
{ programId: programIds.auction, deployPath: localDeployPath('mpl_auction') },
{
programId: programIds.metaplex,
deployPath: localDeployPath('mpl_metaplex'),
},
];

const validator = {
killRunningValidators: true,
programs,
jsonRpcUrl: LOCALHOST,
websocketUrl: '',
commitment: 'confirmed',
ledgerDir: tmpLedgerDir(),
resetLedger: true,
verifyFees: false,
};

module.exports = {
validator,
};
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!--
Thank you for contributing to this project! You must fill out the information
below before we can review this pull request. By explaining why you're making a
change (or linking to a pull request) and what changes you've made, we can
triage your pull request more quickly.

See our [CONTRIBUTING.md](/CONTRIBUTING.md) for information how to contribute.

Thanks again!
-->

### Why?

- Closes [issue link]

<!--
- If there's an existing issue for your change, please link to it.
- If there's _not_ an existing issue, please open one first to make it more likely that this update will be accepted: https://github.com/metaplex-foundation/js/issues/new/choose. -->

### What's being changed?

<!-- Share artifacts of the changes like code snippets, GIFs or screenshots - whatever shares the most context. -->

### Check off the following:

- [ ] I have run `yarn fix` on my code before committing and opening this Pull Request
- [ ] I made sure there are passing tests which cover this change
- [ ] I ran `yarn test:all-local-mpl` locally and tests passed before opening this Pull Request
37 changes: 37 additions & 0 deletions .github/actions/install-rust/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Install Rust

inputs:
toolchain:
description: The Rust version to use, default env.RUST_TOOLCHAIN
required: true

runs:
using: "composite"
steps:
- name: Install Rust Stable
id: rust_toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ inputs.toolchain }}
override: true
profile: minimal
components: rustfmt, clippy

- name: Add Cargo bin to Path
run: |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
shell: bash

- name: Verify Rust install
run: |
echo "Verifying rust '${{ inputs.toolchain }}' ..."
rustc --version
cargo --version
cargo clippy --version
rustfmt --version
shell: bash

- name: Share rustc hash
run: |
echo 'RUSTC_HASH=${{ steps.rust_toolchain.outputs.rustc_hash }}' >> $GITHUB_ENV
shell: bash
39 changes: 39 additions & 0 deletions .github/actions/install-solana/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Install Solana

inputs:
solana_version:
description: Version of Solana to install, default env.SOLANA_VERSION
required: true

runs:
using: "composite"
steps:
- name: Cache Solana Install
if: ${{ !env.ACT }}
id: cache-solana-install
uses: actions/cache@v2
with:
path: "$HOME/.local/share/solana/install/releases/${{ env.SOLANA_VERSION }}"
key: ${{ runner.os }}-Solana-v${{ inputs.solana_version }}

- name: Install Solana
if: ${{ !env.ACT }} && steps.cache-solana-install.cache-hit != 'true'
run: |
sh -c "$(curl -sSfL https://release.solana.com/v${{ inputs.solana_version }}/install)"
shell: bash

- name: Set Active Solana Version
run: |
rm -f "$HOME/.local/share/solana/install/active_release"
ln -s "$HOME/.local/share/solana/install/releases/${{ inputs.solana_version }}/solana-release" "$HOME/.local/share/solana/install/active_release"
shell: bash

- name: Add Solana bin to Path
run: |
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
shell: bash

- name: Verify Solana install
run: |
solana --version
shell: bash
5 changes: 5 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://github.com/marketplace/actions/auto-labeler

labels:
'SDK: JS':
- '.*'
22 changes: 22 additions & 0 deletions .github/workflows/build-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build Lint

on:
pull_request:

jobs:
release:
name: Build Lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14.17.0
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn install --immutable
- name: Lint
run: yarn lint && yarn prettier
18 changes: 18 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# https://github.com/marketplace/actions/auto-labeler

name: Issue and Pull Request labeler
on:
issues:
types: [opened, transferred, reopened]
pull_request_target:
types: [opened, reopened]

jobs:
labeler:
runs-on: ubuntu-latest
steps:
- name: Check Labels
id: labeler
uses: jimschubert/labeler-action@v2
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
24 changes: 11 additions & 13 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14.17.0
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn install --immutable
- name: Lint
run: yarn lint && yarn prettier
- name: Test
run: yarn test
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14.17.0
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn install --immutable
- name: Lint
run: yarn lint && yarn prettier
63 changes: 41 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,50 @@ on:
push:
branches: [main]

env:
SOLANA_VERSION: 1.8.5
RUST_TOOLCHAIN: stable

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14.17.0
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn install --immutable
- name: Test
run: yarn test
- name: Build
run: yarn build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14.17.0
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn install --immutable
- name: Install Solana
uses: ./.github/actions/install-solana
with:
solana_version: ${{ env.SOLANA_VERSION }}
- name: Install Rust
uses: ./.github/actions/install-rust
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Test
run: yarn test:all
- name: Build
run: yarn build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release
- name: Update docs
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
yarn doc
yarn gh-pages -d docs -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading