Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add anchor errors #62

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test-helpers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tensor-foundation/test-helpers",
"version": "0.4.1",
"version": "0.4.2",
"description": "Utility functions for testing Solana programs with the Solana Web3.js library",
"sideEffects": false,
"module": "./dist/src/index.mjs",
Expand Down
1 change: 1 addition & 0 deletions test-helpers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ export * from './addresses';
export * from './constants';
export * from './programIds';
export * from './setup';
export * from './shared';
export * from './token';
export * from './wns';
78 changes: 78 additions & 0 deletions test-helpers/src/shared/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,81 @@ export const TENSOR_ERROR__BAD_METADATA = 9006;
export const TENSOR_ERROR__BAD_RULE_SET = 9007;
export const TENSOR_ERROR__INVALID_CORE_ASSET = 9008;
export const TENSOR_ERROR__INVALID_FEE_ACCOUNT = 9009;

export const ANCHOR_ERROR__INSTRUCTION_MISSING = 100;
export const ANCHOR_ERROR__INSTRUCTION_FALLBACK_NOT_FOUND = 101;
export const ANCHOR_ERROR__INSTRUCTION_DID_NOT_DESERIALIZE = 102;
export const ANCHOR_ERROR__INSTRUCTION_DID_NOT_SERIALIZE = 103;
export const ANCHOR_ERROR__IDL_INSTRUCTION_STUB = 1000;
export const ANCHOR_ERROR__IDL_INSTRUCTION_INVALID_PROGRAM = 1001;
export const ANCHOR_ERROR__IDL_ACCOUNT_NOT_EMPTY = 1002;
export const ANCHOR_ERROR__EVENT_INSTRUCTION_STUB = 1500;
export const ANCHOR_ERROR__CONSTRAINT_MUT = 2000;
export const ANCHOR_ERROR__CONSTRAINT_HAS_ONE = 2001;
export const ANCHOR_ERROR__CONSTRAINT_SIGNER = 2002;
export const ANCHOR_ERROR__CONSTRAINT_RAW = 2003;
export const ANCHOR_ERROR__CONSTRAINT_OWNER = 2004;
export const ANCHOR_ERROR__CONSTRAINT_RENT_EXEMPT = 2005;
export const ANCHOR_ERROR__CONSTRAINT_SEEDS = 2006;
export const ANCHOR_ERROR__CONSTRAINT_EXECUTABLE = 2007;
export const ANCHOR_ERROR__CONSTRAINT_STATE = 2008;
export const ANCHOR_ERROR__CONSTRAINT_ASSOCIATED = 2009;
export const ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_INIT = 2010;
export const ANCHOR_ERROR__CONSTRAINT_CLOSE = 2011;
export const ANCHOR_ERROR__CONSTRAINT_ADDRESS = 2012;
export const ANCHOR_ERROR__CONSTRAINT_ZERO = 2013;
export const ANCHOR_ERROR__CONSTRAINT_TOKEN_MINT = 2014;
export const ANCHOR_ERROR__CONSTRAINT_TOKEN_OWNER = 2015;
export const ANCHOR_ERROR__CONSTRAINT_MINT_MINT_AUTHORITY = 2016;
export const ANCHOR_ERROR__CONSTRAINT_MINT_FREEZE_AUTHORITY = 2017;
export const ANCHOR_ERROR__CONSTRAINT_MINT_DECIMALS = 2018;
export const ANCHOR_ERROR__CONSTRAINT_SPACE = 2019;
export const ANCHOR_ERROR__CONSTRAINT_ACCOUNT_IS_NONE = 2020;
export const ANCHOR_ERROR__CONSTRAINT_TOKEN_TOKEN_PROGRAM = 2021;
export const ANCHOR_ERROR__CONSTRAINT_MINT_TOKEN_PROGRAM = 2022;
export const ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_TOKEN_TOKEN_PROGRAM = 2023;
export const ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION = 2024;
export const ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_AUTHORITY = 2025;
export const ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_GROUP_ADDRESS = 2026;
export const ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION = 2027;
export const ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_AUTHORITY = 2028;
export const ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_MEMBER_ADDRESS = 2029;
export const ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION = 2030;
export const ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_AUTHORITY = 2031;
export const ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_METADATA_ADDRESS = 2032;
export const ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION = 2033;
export const ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION_AUTHORITY = 2034;
export const ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION = 2035;
export const ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION_DELEGATE = 2036;
export const ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION = 2037;
export const ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_AUTHORITY = 2038;
export const ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_PROGRAM_ID = 2039;
export const ANCHOR_ERROR__REQUIRE_VIOLATED = 2500;
export const ANCHOR_ERROR__REQUIRE_EQ_VIOLATED = 2501;
export const ANCHOR_ERROR__REQUIRE_KEYS_EQ_VIOLATED = 2502;
export const ANCHOR_ERROR__REQUIRE_NEQ_VIOLATED = 2503;
export const ANCHOR_ERROR__REQUIRE_KEYS_NEQ_VIOLATED = 2504;
export const ANCHOR_ERROR__REQUIRE_GT_VIOLATED = 2505;
export const ANCHOR_ERROR__REQUIRE_GTE_VIOLATED = 2506;
export const ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_ALREADY_SET = 3000;
export const ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_NOT_FOUND = 3001;
export const ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_MISMATCH = 3002;
export const ANCHOR_ERROR__ACCOUNT_DID_NOT_DESERIALIZE = 3003;
export const ANCHOR_ERROR__ACCOUNT_DID_NOT_SERIALIZE = 3004;
export const ANCHOR_ERROR__ACCOUNT_NOT_ENOUGH_KEYS = 3005;
export const ANCHOR_ERROR__ACCOUNT_NOT_MUTABLE = 3006;
export const ANCHOR_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM = 3007;
export const ANCHOR_ERROR__INVALID_PROGRAM_ID = 3008;
export const ANCHOR_ERROR__INVALID_PROGRAM_EXECUTABLE = 3009;
export const ANCHOR_ERROR__ACCOUNT_NOT_SIGNER = 3010;
export const ANCHOR_ERROR__ACCOUNT_NOT_SYSTEM_OWNED = 3011;
export const ANCHOR_ERROR__ACCOUNT_NOT_INITIALIZED = 3012;
export const ANCHOR_ERROR__ACCOUNT_NOT_PROGRAM_DATA = 3013;
export const ANCHOR_ERROR__ACCOUNT_NOT_ASSOCIATED_TOKEN_ACCOUNT = 3014;
export const ANCHOR_ERROR__ACCOUNT_SYSVAR_MISMATCH = 3015;
export const ANCHOR_ERROR__ACCOUNT_REALLOC_EXCEEDS_LIMIT = 3016;
export const ANCHOR_ERROR__ACCOUNT_DUPLICATE_REALLOCS = 3017;
export const ANCHOR_ERROR__DECLARED_PROGRAM_ID_MISMATCH = 4100;
export const ANCHOR_ERROR__TRYING_TO_INIT_PAYER_AS_PROGRAM_ACCOUNT = 4101;
export const ANCHOR_ERROR__INVALID_NUMERIC_CONVERSION = 4102;
export const ANCHOR_ERROR__DEPRECATED = 5000;
Loading