Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
376748c
Bump anchor version
stegaBOB Apr 29, 2022
d81b069
split into multiple files
stegaBOB Apr 29, 2022
a9016c8
re add the accessor methods
stegaBOB Apr 29, 2022
bc8e82a
enforce collections
stegaBOB Apr 30, 2022
d19cfea
Bump version
stegaBOB Apr 30, 2022
58255fc
fix tests
stegaBOB Apr 30, 2022
26b6b45
Merge remote-tracking branch 'origin/stegaBOB/enforce-cm-collections'…
stegaBOB Apr 30, 2022
406cb8b
fix tests
stegaBOB Apr 30, 2022
c94a54d
Merge branch 'master' into stegaBOB/enforce-cm-collections
stegaBOB May 4, 2022
f78258b
more fixes
stegaBOB May 5, 2022
766f1af
gatekeeper compute improvement
stegaBOB May 5, 2022
f8e72e1
reordered stuff to make api gen better
stegaBOB May 5, 2022
a2a7415
Merge branch 'master' into stegaBOB/enforce-cm-collections
stegaBOB May 5, 2022
fee2f7d
reexport stuff
stegaBOB May 5, 2022
35657d5
Merge remote-tracking branch 'origin/stegaBOB/enforce-cm-collections'…
stegaBOB May 5, 2022
acf0c57
fix/document unsafe and constrain uuid in update
stegaBOB May 6, 2022
9c4ea64
More punish bot checks
stegaBOB May 6, 2022
5d93d72
Merge branch 'master' into stegaBOB/enforce-cm-collections
stegaBOB May 6, 2022
1add77b
adding hidden settings fix
stegaBOB May 6, 2022
b1904f1
merge
stegaBOB May 9, 2022
675791b
Prevent changing collection after items have been minted
stegaBOB May 10, 2022
def5c13
update js sdk
stegaBOB May 10, 2022
f0fab5e
Merge branch 'master' into stegaBOB/enforce-cm-collections
stegaBOB May 10, 2022
72727f4
Merge branch 'master' into stegaBOB/enforce-cm-collections
stegaBOB May 14, 2022
4089b42
fix nits and unbreak stuff
stegaBOB May 16, 2022
711cf1d
Merge remote-tracking branch 'origin/stegaBOB/enforce-cm-collections'…
stegaBOB May 16, 2022
f99e6a5
update solita and generated commands
stegaBOB May 16, 2022
8dc6490
remove commented out debug messages
stegaBOB May 16, 2022
2beab0f
remove more debug stuff
stegaBOB May 16, 2022
54f5e29
more debug stuff and reordered some imports
stegaBOB May 18, 2022
e5adae7
more debug stuff
stegaBOB May 18, 2022
dc204df
Merge branch 'master' into stegaBOB/enforce-cm-collections
stegaBOB May 18, 2022
7b38a30
fix js stuff
stegaBOB May 18, 2022
8a9025e
Merge remote-tracking branch 'origin/stegaBOB/enforce-cm-collections'…
stegaBOB May 18, 2022
36a5fb5
fix lockfile
stegaBOB May 18, 2022
b97c001
add test files
stegaBOB May 18, 2022
11ea19a
fix program test
stegaBOB May 18, 2022
8a5370d
actually fix program test CI
stegaBOB May 18, 2022
7e4a399
reorganized imports to make more sense
stegaBOB May 18, 2022
6db43e2
updated IDL (just reordering. No actual changes)
stegaBOB May 18, 2022
853e873
Lots of changes!
stegaBOB May 18, 2022
d433af1
More checks and fix account check error
stegaBOB May 20, 2022
0558839
fix ocd
stegaBOB May 20, 2022
5c38db5
update errors js sdk
stegaBOB May 21, 2022
f9d532f
update errors idl
stegaBOB May 21, 2022
67c8d59
update more test helpers
stegaBOB May 21, 2022
9aefc43
add change from master
stegaBOB May 22, 2022
0f84d2f
finish test primitives
stegaBOB May 22, 2022
9a26897
Merge branch 'master' into stegaBOB/enforce-cm-collections
stegaBOB May 23, 2022
63f386b
reorder IDL stuff
stegaBOB May 23, 2022
759b21d
Merge remote-tracking branch 'origin/stegaBOB/enforce-cm-collections'…
stegaBOB May 23, 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
7 changes: 2 additions & 5 deletions .github/workflows/program-candy-machine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
CARGO_TERM_COLOR: always
SOLANA_VERSION: 1.9.14
SOLANA_VERSION: 1.9.18
RUST_TOOLCHAIN: stable

jobs:
Expand Down Expand Up @@ -57,10 +57,7 @@ jobs:
~/.cargo/git/db/
./rust/target
key: ${{ env.cache_id }}-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.RUSTC_HASH }}

# Build deps
- uses: ./.github/actions/build-token-vault

- uses: ./.github/actions/build-token-metadata
# Run test
- name: test-candy-machine
id: run_test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sdk-candy-machine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- 'core/**'
package:
- 'candy-machine/**'
build-lint-and-test-auction:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to do all this in one step consider breaking up in the future

build-lint-and-test-candy-machine:
needs: changes
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.package == 'true' }}
runs-on: ubuntu-latest
Expand Down
16 changes: 16 additions & 0 deletions candy-machine/js/.solitarc.js
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',
programId: 'cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ',
idlDir,
sdkDir,
binaryInstallDir,
programDir,
};
282 changes: 182 additions & 100 deletions candy-machine/js/idl/candy_machine.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.1.3",
"version": "4.0.0",
"name": "candy_machine",
"instructions": [
{
Expand Down Expand Up @@ -259,7 +259,7 @@
"accounts": [
{
"name": "candyMachine",
"isMut": false,
"isMut": true,
"isSigner": false
},
{
Expand Down Expand Up @@ -320,7 +320,7 @@
"accounts": [
{
"name": "candyMachine",
"isMut": false,
"isMut": true,
"isSigner": false
},
{
Expand Down Expand Up @@ -688,107 +688,189 @@
}
]
}
}
],
"errors": [
{
"code": 6000,
"name": "IncorrectOwner",
"msg": "Account does not have correct owner!"
},
{
"name": "ErrorCode",
"type": {
"kind": "enum",
"variants": [
{
"name": "IncorrectOwner"
},
{
"name": "Uninitialized"
},
{
"name": "MintMismatch"
},
{
"name": "IndexGreaterThanLength"
},
{
"name": "NumericalOverflowError"
},
{
"name": "TooManyCreators"
},
{
"name": "UuidMustBeExactly6Length"
},
{
"name": "NotEnoughTokens"
},
{
"name": "NotEnoughSOL"
},
{
"name": "TokenTransferFailed"
},
{
"name": "CandyMachineEmpty"
},
{
"name": "CandyMachineNotLive"
},
{
"name": "HiddenSettingsConfigsDoNotHaveConfigLines"
},
{
"name": "CannotChangeNumberOfLines"
},
{
"name": "DerivedKeyInvalid"
},
{
"name": "PublicKeyMismatch"
},
{
"name": "NoWhitelistToken"
},
{
"name": "TokenBurnFailed"
},
{
"name": "GatewayAppMissing"
},
{
"name": "GatewayTokenMissing"
},
{
"name": "GatewayTokenExpireTimeInvalid"
},
{
"name": "NetworkExpireFeatureMissing"
},
{
"name": "CannotFindUsableConfigLine"
},
{
"name": "InvalidString"
},
{
"name": "SuspiciousTransaction"
},
{
"name": "CannotSwitchToHiddenSettings"
},
{
"name": "IncorrectSlotHashesPubkey"
},
{
"name": "IncorrectCollectionAuthority"
},
{
"name": "MismatchedCollectionPDA"
},
{
"name": "MismatchedCollectionMint"
}
]
}
"code": 6001,
"name": "Uninitialized",
"msg": "Account is not initialized!"
},
{
"code": 6002,
"name": "MintMismatch",
"msg": "Mint Mismatch!"
},
{
"code": 6003,
"name": "IndexGreaterThanLength",
"msg": "Index greater than length!"
},
{
"code": 6004,
"name": "NumericalOverflowError",
"msg": "Numerical overflow error!"
},
{
"code": 6005,
"name": "TooManyCreators",
"msg": "Can only provide up to 4 creators to candy machine (because candy machine is one)!"
},
{
"code": 6006,
"name": "UuidMustBeExactly6Length",
"msg": "Uuid must be exactly of 6 length"
},
{
"code": 6007,
"name": "NotEnoughTokens",
"msg": "Not enough tokens to pay for this minting"
},
{
"code": 6008,
"name": "NotEnoughSOL",
"msg": "Not enough SOL to pay for this minting"
},
{
"code": 6009,
"name": "TokenTransferFailed",
"msg": "Token transfer failed"
},
{
"code": 6010,
"name": "CandyMachineEmpty",
"msg": "Candy machine is empty!"
},
{
"code": 6011,
"name": "CandyMachineNotLive",
"msg": "Candy machine is not live!"
},
{
"code": 6012,
"name": "HiddenSettingsConfigsDoNotHaveConfigLines",
"msg": "Configs that are using hidden uris do not have config lines, they have a single hash representing hashed order"
},
{
"code": 6013,
"name": "CannotChangeNumberOfLines",
"msg": "Cannot change number of lines unless is a hidden config"
},
{
"code": 6014,
"name": "DerivedKeyInvalid",
"msg": "Derived key invalid"
},
{
"code": 6015,
"name": "PublicKeyMismatch",
"msg": "Public key mismatch"
},
{
"code": 6016,
"name": "NoWhitelistToken",
"msg": "No whitelist token present"
},
{
"code": 6017,
"name": "TokenBurnFailed",
"msg": "Token burn failed"
},
{
"code": 6018,
"name": "GatewayAppMissing",
"msg": "Missing gateway app when required"
},
{
"code": 6019,
"name": "GatewayTokenMissing",
"msg": "Missing gateway token when required"
},
{
"code": 6020,
"name": "GatewayTokenExpireTimeInvalid",
"msg": "Invalid gateway token expire time"
},
{
"code": 6021,
"name": "NetworkExpireFeatureMissing",
"msg": "Missing gateway network expire feature when required"
},
{
"code": 6022,
"name": "CannotFindUsableConfigLine",
"msg": "Unable to find an unused config line near your random number index"
},
{
"code": 6023,
"name": "InvalidString",
"msg": "Invalid string"
},
{
"code": 6024,
"name": "SuspiciousTransaction",
"msg": "Suspicious transaction detected"
},
{
"code": 6025,
"name": "CannotSwitchToHiddenSettings",
"msg": "Cannot Switch to Hidden Settings after items available is greater than 0"
},
{
"code": 6026,
"name": "IncorrectSlotHashesPubkey",
"msg": "Incorrect SlotHashes PubKey"
},
{
"code": 6027,
"name": "IncorrectCollectionAuthority",
"msg": "Incorrect collection NFT authority"
},
{
"code": 6028,
"name": "MismatchedCollectionPDA",
"msg": "Collection PDA address is invalid"
},
{
"code": 6029,
"name": "MismatchedCollectionMint",
"msg": "Provided mint account doesn't match collection PDA mint"
},
{
"code": 6030,
"name": "SlotHashesEmpty",
"msg": "Slot hashes Sysvar is empty"
},
{
"code": 6031,
"name": "MetadataAccountMustBeEmpty",
"msg": "The metadata account has data in it, and this must be empty to mint a new NFT"
},
{
"code": 6032,
"name": "MissingSetCollectionDuringMint",
"msg": "Missing set collection during mint IX for Candy Machine with collection set"
},
{
"code": 6033,
"name": "NoChangingCollectionDuringMint",
"msg": "Can't change collection settings after items have begun to be minted"
},
{
"code": 6034,
"name": "CandyCollectionRequiresRetainAuthority",
"msg": "Retain authority must be true for Candy Machines with a collection set"
}
],
"metadata": {
"address": "cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ"
"address": "cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ",
"origin": "anchor",
"binaryVersion": "0.24.2",
"libVersion": "0.24.2"
}
}
2 changes: 1 addition & 1 deletion candy-machine/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build:docs": "typedoc",
"build": "rimraf dist && tsc -p tsconfig.json",
"test": "echo mpl-candy-machine tests coming up ...",
"api:gen": "node scripts/api-gen-ts.js && prettier --write ./src/**/*.ts",
"api:gen": "DEBUG='(solita|rustbin):(info|error)' solita",
"lint": "eslint \"{src,test}/**/*.ts\" --format stylish",
"fix:lint": "yarn lint --fix",
"prettier": "prettier \"{src,test}/**/*.ts\" --check",
Expand Down
Loading