2022-01-21 10:21:46 -08:00
|
|
|
#[macro_use]
|
|
|
|
extern crate static_assertions;
|
|
|
|
|
|
|
|
use anchor_lang::prelude::*;
|
|
|
|
|
|
|
|
mod error;
|
2022-02-10 00:07:34 -08:00
|
|
|
mod instructions;
|
|
|
|
mod state;
|
2022-01-21 10:21:46 -08:00
|
|
|
|
|
|
|
use instructions::*;
|
|
|
|
|
|
|
|
declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");
|
|
|
|
|
|
|
|
#[program]
|
|
|
|
pub mod mango_v4 {
|
|
|
|
use super::*;
|
|
|
|
|
2022-02-22 00:49:02 -08:00
|
|
|
pub fn create_group(ctx: Context<CreateGroup>) -> Result<()> {
|
|
|
|
instructions::create_group(ctx)
|
2022-01-21 10:21:46 -08:00
|
|
|
}
|
2022-02-22 01:09:09 -08:00
|
|
|
|
|
|
|
pub fn register_token(ctx: Context<RegisterToken>, decimals: u8) -> Result<()> {
|
|
|
|
instructions::register_token(ctx, decimals)
|
|
|
|
}
|
2022-01-21 10:21:46 -08:00
|
|
|
}
|
2022-02-02 02:55:44 -08:00
|
|
|
|
|
|
|
#[derive(Clone)]
|
|
|
|
pub struct Mango;
|
|
|
|
|
|
|
|
impl anchor_lang::Id for Mango {
|
|
|
|
fn id() -> Pubkey {
|
|
|
|
ID
|
|
|
|
}
|
|
|
|
}
|