1use anchor_lang::prelude::*;
2use instructions::*;
3use state::*;
4
5mod constants;
6mod constraints;
7mod errors;
8mod events;
9pub mod instructions;
10pub mod state;
11
12declare_id!("TRDwq3BN4mP3m9KsuNUWSN6QDff93VKGSwE95Jbr9Ss");
13
14#[program]
15pub mod triad_protocol {
16 use super::*;
17
18 pub fn create_user_position(ctx: Context<CreateUserPosition>) -> Result<()> {
19 instructions::create_user_position(ctx)
20 }
21
22 pub fn create_ticker(ctx: Context<CreateTicker>, args: CreateTickerArgs) -> Result<()> {
23 instructions::create_ticker(ctx, args)
24 }
25
26 pub fn update_ticker_price(
27 ctx: Context<UpdateTickerPrice>,
28 args: UpdateTickerPriceArgs
29 ) -> Result<()> {
30 instructions::update_ticker_price(ctx, args)
31 }
32
33 pub fn open_position(ctx: Context<OpenPosition>, args: OpenPositionArgs) -> Result<()> {
34 instructions::open_position(ctx, args)
35 }
36
37 pub fn close_position(ctx: Context<ClosePosition>, args: ClosePositionArgs) -> Result<()> {
38 instructions::close_position(ctx, args)
39 }
40
41 pub fn stake_nft(ctx: Context<StakeNFT>, args: StakeNFTArgs) -> Result<()> {
42 instructions::stake_nft(ctx, args)
43 }
44
45 pub fn stake_token(ctx: Context<StakeToken>, args: StakeTokenArgs) -> Result<()> {
46 instructions::stake_token(ctx, args)
47 }
48
49 pub fn initialize_stake_vault(
50 ctx: Context<InitializeStakeVault>,
51 args: InitializeStakeVaultArgs
52 ) -> Result<()> {
53 instructions::initialize_stake_vault(ctx, args)
54 }
55
56 pub fn request_withdraw_stake(ctx: Context<RequestWithdrawStake>) -> Result<()> {
57 instructions::request_withdraw_stake(ctx)
58 }
59
60 pub fn withdraw_stake(ctx: Context<WithdrawStake>) -> Result<()> {
61 instructions::withdraw_stake(ctx)
62 }
63
64 pub fn deposit_stake_rewards(
65 ctx: Context<DepositStakeRewards>,
66 args: DepositStakeRewardsArgs
67 ) -> Result<()> {
68 instructions::deposit_stake_rewards(ctx, args)
69 }
70
71 pub fn update_stake_vault_status(
72 ctx: Context<UpdateStakeVaultStatus>,
73 args: UpdateStakeVaultStatusArgs
74 ) -> Result<()> {
75 instructions::update_stake_vault_status(ctx, args)
76 }
77
78 pub fn claim_stake(ctx: Context<ClaimStake>) -> Result<()> {
79 instructions::claim_stake(ctx)
80 }
81
82 pub fn create_user(ctx: Context<CreateUser>, args: CreateUserArgs) -> Result<()> {
83 instructions::create_user(ctx, args)
84 }
85
86 pub fn swap_404(ctx: Context<Swap404>) -> Result<()> {
87 instructions::swap_404(ctx)
88 }
89}