sablier_network_program/instructions/
registry_nonce_hash.rs

1use sablier_utils::thread::ThreadResponse;
2
3use {
4    crate::{constants::*, state::*},
5    anchor_lang::prelude::*,
6};
7
8#[derive(Accounts)]
9pub struct RegistryNonceHash<'info> {
10    #[account(address = Config::pubkey())]
11    pub config: AccountLoader<'info, Config>,
12
13    #[account(
14        mut,
15        seeds = [SEED_REGISTRY],
16        bump
17    )]
18    pub registry: Account<'info, Registry>,
19
20    #[account(address = config.load()?.hasher_thread)]
21    pub thread: Signer<'info>,
22}
23
24pub fn handler(ctx: Context<RegistryNonceHash>) -> Result<ThreadResponse> {
25    let registry = &mut ctx.accounts.registry;
26    registry.hash_nonce()?;
27    Ok(ThreadResponse::default())
28}