Skip to main content

process

Function process 

Source
pub fn process(
    program_id: &Pubkey,
    accounts: &[AccountInfo],
    data: &[u8],
) -> ProgramResult
Expand description

Create a new escrow order

Accounts: 0. [signer, writable] Payer - user creating the escrow

  1. [writable] Escrow state account (PDA)
  2. [writable] Escrow vault account (PDA) - holds the SOL
  3. [] System program

Data:

  • amount: u64 (8 bytes)
  • mail_id_low: u64 (8 bytes)
  • mail_id_high: u64 (8 bytes)
  • timeout_days: u8 (1 byte) - 0 means default 7 days