57 lines
1.4 KiB
Rust
57 lines
1.4 KiB
Rust
#![allow(clippy::diverging_sub_expression)]
|
|
|
|
pub mod error;
|
|
pub mod instructions;
|
|
pub mod state;
|
|
|
|
use anchor_lang::prelude::*;
|
|
|
|
pub use error::*;
|
|
pub use instructions::*;
|
|
pub use state::*;
|
|
|
|
// Replace with actual program ID after first deployment
|
|
declare_id!("GwUPAKs3HHzCpj8uhet4NAnxk9GWNwfrYbpihu5DyFp");
|
|
|
|
/// Escrow Program ID — only its PDA may call update_stats.
|
|
pub const ESCROW_PROGRAM_ID: Pubkey = pubkey!("DjVR4EuYV6USMJFfsGZwhZ3y8rtWsmG8EvDY96GTqqi3");
|
|
|
|
#[program]
|
|
pub mod descro_ext_resolvers {
|
|
use super::*;
|
|
|
|
pub fn register_resolver(
|
|
ctx: Context<RegisterResolver>,
|
|
resolver_type: ResolverType,
|
|
name: String,
|
|
description: String,
|
|
fee_bps: u16,
|
|
fee_recipient: Pubkey,
|
|
metadata_uri: String,
|
|
) -> Result<()> {
|
|
register::handler(
|
|
ctx,
|
|
resolver_type,
|
|
name,
|
|
description,
|
|
fee_bps,
|
|
fee_recipient,
|
|
metadata_uri,
|
|
)
|
|
}
|
|
|
|
pub fn update_resolver(
|
|
ctx: Context<UpdateResolver>,
|
|
name: String,
|
|
description: String,
|
|
fee_bps: u16,
|
|
metadata_uri: String,
|
|
) -> Result<()> {
|
|
update::handler(ctx, name, description, fee_bps, metadata_uri)
|
|
}
|
|
|
|
pub fn update_stats(ctx: Context<UpdateStats>, ruling: Ruling) -> Result<()> {
|
|
update_stats::handler(ctx, ruling)
|
|
}
|
|
}
|