lib.rs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. use anchor_lang::prelude::*;
  2. pub mod instructions;
  3. use instructions::*;
  4. declare_id!("8vbaY8zv9r3AgeLjyAr7LEprJwLN5Jjus97crJBD2AV2");
  5. #[program]
  6. pub mod mint_2 {
  7. use super::*;
  8. pub fn create_token_mint(
  9. ctx: Context<CreateTokenMint>,
  10. metadata_title: String,
  11. metadata_symbol: String,
  12. metadata_uri: String,
  13. mint_authority_pda_bump: u8,
  14. ) -> Result<()> {
  15. create_token_mint::create_token_mint(
  16. ctx,
  17. metadata_title,
  18. metadata_symbol,
  19. metadata_uri,
  20. mint_authority_pda_bump,
  21. )
  22. }
  23. pub fn mint_to_your_wallet(
  24. ctx: Context<MintToYourWallet>,
  25. amount: u64,
  26. mint_authority_pda_bump: u8,
  27. ) -> Result<()> {
  28. mint_to_your_wallet::mint_to_your_wallet(
  29. ctx,
  30. amount,
  31. mint_authority_pda_bump,
  32. )
  33. }
  34. pub fn mint_to_another_wallet(
  35. ctx: Context<MintToAnotherWallet>,
  36. amount: u64,
  37. mint_authority_pda_bump: u8,
  38. ) -> Result<()> {
  39. mint_to_another_wallet::mint_to_another_wallet(
  40. ctx,
  41. amount,
  42. mint_authority_pda_bump,
  43. )
  44. }
  45. pub fn transfer_to_another_wallet(
  46. ctx: Context<TransferToAnotherWallet>,
  47. amount: u64,
  48. ) -> Result<()> {
  49. transfer_to_another_wallet::transfer_to_another_wallet(
  50. ctx,
  51. amount,
  52. )
  53. }
  54. }