| 18 | 'Proxy11111111111111111111111111111111111111' as PublicKey<'Proxy11111111111111111111111111111111111111'>; |
| 19 | |
| 20 | export function createProxyProgram(): Program { |
| 21 | return { |
| 22 | name: 'proxy', |
| 23 | publicKey: PROXY_PROGRAM_ID, |
| 24 | getErrorFromCode(code: number, cause?: Error) { |
| 25 | return getProxyErrorFromCode(code, this, cause); |
| 26 | }, |
| 27 | getErrorFromName(name: string, cause?: Error) { |
| 28 | return getProxyErrorFromName(name, this, cause); |
| 29 | }, |
| 30 | isOnCluster() { |
| 31 | return true; |
| 32 | }, |
| 33 | }; |
| 34 | } |
| 35 | |
| 36 | export function getProxyProgram<T extends Program = Program>( |
| 37 | context: Pick<Context, 'programs'>, |