pango

Reference

Program reference

The four instructions, their accounts and their data.

Rust, Pinocchio 0.11, no allocation beyond the entrypoint's. Size 31,624 bytes. Program id of this build: AWLrA7jQd8uoqmgmoGQhrGiMZ9Ls1uYzc8rX2a2vRG1Q (a build key, replaced when you deploy).

TagInstructionAccountsData
0Initowner (signer, writable), guard PDA (writable), System programbump
1Beginguard (writable), owner (signer), watched accounts...none
2Endguard (writable), owner (signer), Instructions sysvar, the same watched accounts in the same ordern, then n checks of 16 bytes
3Closeguard (writable), owner (signer, writable)none

A check, 16 bytes

entry u8 | kind u8 | 6 bytes of padding | value i64 (little endian)
kind 0: SOL moved by at least value     kind 1: tokens moved by at least value     kind 2: delegate at most value

Errors

An error is a custom program error. The low byte is the code, the next byte is the watched entry: code | entry << 8.

CodeNameMeaning
1BadAccountwrong guard, wrong account order
2NotSignerthe owner did not sign
3NotArmedno snapshot
4NotLastEnd is not the last instruction
5NoBeginno Begin earlier in this transaction
6StaleSnapshotthe snapshot is from another slot
7TooManymore than ten watched accounts
8Malformedbad data, duplicate account
9WatchFaileda balance went down and you did not allow it
10CheckFaileda declared bound was not met
11ProgramChangedthe account was assigned to another program
12AuthorityChangeda token account has a new owner
13CloseAuthoritya close authority appeared or changed
14DelegateNotDeclareda new or bigger delegate nobody allowed
15AccountCloseda watched token account no longer exists
16AlreadyInitializedInit twice
17Unsupporteda mint or multisig on the watch list
18FirstMustBeOwnerentry 0 is not your wallet