Skip to main content
deleted 1 character in body
Source Link
Jonas H.
  • 7.2k
  • 1
  • 7
  • 26

You can for ecxampleexample add a check on who can call the function like so:

https://beta.solpg.io/tutorials/battle-coins

const ADMIN_PUBKEY: Pubkey = pubkey!("REPLACE_WITH_YOUR_WALLET_PUBKEY");
...
#[account(
    mut,
    address = ADMIN_PUBKEY
)]
pub admin: Signer<'info>,

You can for ecxample add a check on who can call the function like so:

https://beta.solpg.io/tutorials/battle-coins

const ADMIN_PUBKEY: Pubkey = pubkey!("REPLACE_WITH_YOUR_WALLET_PUBKEY");
...
#[account(
    mut,
    address = ADMIN_PUBKEY
)]
pub admin: Signer<'info>,

You can for example add a check on who can call the function like so:

https://beta.solpg.io/tutorials/battle-coins

const ADMIN_PUBKEY: Pubkey = pubkey!("REPLACE_WITH_YOUR_WALLET_PUBKEY");
...
#[account(
    mut,
    address = ADMIN_PUBKEY
)]
pub admin: Signer<'info>,
Source Link
Jonas H.
  • 7.2k
  • 1
  • 7
  • 26

You can for ecxample add a check on who can call the function like so:

https://beta.solpg.io/tutorials/battle-coins

const ADMIN_PUBKEY: Pubkey = pubkey!("REPLACE_WITH_YOUR_WALLET_PUBKEY");
...
#[account(
    mut,
    address = ADMIN_PUBKEY
)]
pub admin: Signer<'info>,