Update candy machine with anchor v0.14.0 (#283)

This commit is contained in:
Armani Ferrante 2021-09-04 15:59:44 -07:00 committed by GitHub
parent 40cfa29511
commit e0f2c1b068
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 158 additions and 503 deletions

View File

@ -5,6 +5,9 @@ url = "https://anchor.projectserum.com"
cluster = "localnet"
wallet = "~/.config/solana/id.json"
[programs.mainnet]
nft_candy_machine = "cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ"
[scripts]
test = "mocha -t 1000000 tests/"

640
rust/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -15,8 +15,7 @@ cpi = ["no-entrypoint"]
default = []
[dependencies]
anchor-lang = "0.13.2"
anchor-lang = "0.14.0"
arrayref = "0.3.6"
spl-token = { version="3.1.1", features = [ "no-entrypoint" ] }
spl-token-metadata = { path = "../token-metadata/program", features = [ "no-entrypoint" ] }

View File

@ -451,7 +451,13 @@ pub struct AddConfigLines<'info> {
#[derive(Accounts)]
pub struct MintNFT<'info> {
config: ProgramAccount<'info, Config>,
#[account(mut, has_one = config, has_one = wallet, seeds=[PREFIX.as_bytes(), config.key().as_ref(), candy_machine.data.uuid.as_bytes(), &[candy_machine.bump]])]
#[account(
mut,
has_one = config,
has_one = wallet,
seeds = [PREFIX.as_bytes(), config.key().as_ref(), candy_machine.data.uuid.as_bytes()],
bump = candy_machine.bump,
)]
candy_machine: ProgramAccount<'info, CandyMachine>,
#[account(mut, signer)]
payer: AccountInfo<'info>,
@ -481,7 +487,12 @@ pub struct MintNFT<'info> {
#[derive(Accounts)]
pub struct UpdateCandyMachine<'info> {
#[account(mut, has_one=authority, seeds=[PREFIX.as_bytes(), candy_machine.config.key().as_ref(), candy_machine.data.uuid.as_bytes(), &[candy_machine.bump]])]
#[account(
mut,
has_one = authority,
seeds = [PREFIX.as_bytes(), candy_machine.config.key().as_ref(), candy_machine.data.uuid.as_bytes()],
bump = candy_machine.bump
)]
candy_machine: ProgramAccount<'info, CandyMachine>,
#[account(signer)]
authority: AccountInfo<'info>,