Update candy machine with anchor v0.14.0 (#283)
This commit is contained in:
parent
40cfa29511
commit
e0f2c1b068
|
@ -5,6 +5,9 @@ url = "https://anchor.projectserum.com"
|
||||||
cluster = "localnet"
|
cluster = "localnet"
|
||||||
wallet = "~/.config/solana/id.json"
|
wallet = "~/.config/solana/id.json"
|
||||||
|
|
||||||
|
[programs.mainnet]
|
||||||
|
nft_candy_machine = "cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ"
|
||||||
|
|
||||||
[scripts]
|
[scripts]
|
||||||
test = "mocha -t 1000000 tests/"
|
test = "mocha -t 1000000 tests/"
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -15,8 +15,7 @@ cpi = ["no-entrypoint"]
|
||||||
default = []
|
default = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anchor-lang = "0.13.2"
|
anchor-lang = "0.14.0"
|
||||||
arrayref = "0.3.6"
|
arrayref = "0.3.6"
|
||||||
spl-token = { version="3.1.1", features = [ "no-entrypoint" ] }
|
spl-token = { version="3.1.1", features = [ "no-entrypoint" ] }
|
||||||
spl-token-metadata = { path = "../token-metadata/program", features = [ "no-entrypoint" ] }
|
spl-token-metadata = { path = "../token-metadata/program", features = [ "no-entrypoint" ] }
|
||||||
|
|
||||||
|
|
|
@ -451,7 +451,13 @@ pub struct AddConfigLines<'info> {
|
||||||
#[derive(Accounts)]
|
#[derive(Accounts)]
|
||||||
pub struct MintNFT<'info> {
|
pub struct MintNFT<'info> {
|
||||||
config: ProgramAccount<'info, Config>,
|
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>,
|
candy_machine: ProgramAccount<'info, CandyMachine>,
|
||||||
#[account(mut, signer)]
|
#[account(mut, signer)]
|
||||||
payer: AccountInfo<'info>,
|
payer: AccountInfo<'info>,
|
||||||
|
@ -481,7 +487,12 @@ pub struct MintNFT<'info> {
|
||||||
|
|
||||||
#[derive(Accounts)]
|
#[derive(Accounts)]
|
||||||
pub struct UpdateCandyMachine<'info> {
|
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>,
|
candy_machine: ProgramAccount<'info, CandyMachine>,
|
||||||
#[account(signer)]
|
#[account(signer)]
|
||||||
authority: AccountInfo<'info>,
|
authority: AccountInfo<'info>,
|
||||||
|
|
Loading…
Reference in New Issue