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).
| Tag | Instruction | Accounts | Data |
|---|---|---|---|
| 0 | Init | owner (signer, writable), guard PDA (writable), System program | bump |
| 1 | Begin | guard (writable), owner (signer), watched accounts... | none |
| 2 | End | guard (writable), owner (signer), Instructions sysvar, the same watched accounts in the same order | n, then n checks of 16 bytes |
| 3 | Close | guard (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.
| Code | Name | Meaning |
|---|---|---|
| 1 | BadAccount | wrong guard, wrong account order |
| 2 | NotSigner | the owner did not sign |
| 3 | NotArmed | no snapshot |
| 4 | NotLast | End is not the last instruction |
| 5 | NoBegin | no Begin earlier in this transaction |
| 6 | StaleSnapshot | the snapshot is from another slot |
| 7 | TooMany | more than ten watched accounts |
| 8 | Malformed | bad data, duplicate account |
| 9 | WatchFailed | a balance went down and you did not allow it |
| 10 | CheckFailed | a declared bound was not met |
| 11 | ProgramChanged | the account was assigned to another program |
| 12 | AuthorityChanged | a token account has a new owner |
| 13 | CloseAuthority | a close authority appeared or changed |
| 14 | DelegateNotDeclared | a new or bigger delegate nobody allowed |
| 15 | AccountClosed | a watched token account no longer exists |
| 16 | AlreadyInitialized | Init twice |
| 17 | Unsupported | a mint or multisig on the watch list |
| 18 | FirstMustBeOwner | entry 0 is not your wallet |