miden_lib/errors/
tx_kernel_errors.rs

1// This file is generated by build.rs, do not modify manually.
2// It is generated by extracting errors from the masm files in the `miden-lib/asm` directory.
3//
4// To add a new error, define a constant in masm of the pattern `const.ERR_<CATEGORY>_...`.
5// Try to fit the error into a pre-existing category if possible (e.g. Account, Prologue,
6// Non-Fungible-Asset, ...).
7//
8// The comment directly above the constant will be interpreted as the error message for that error.
9
10// Transaction Kernel errors are in range 0x20000..0x24000.
11// Its sub categories are:
12// KERNEL is in range 0x20000..0x20040
13// PROLOGUE is in range 0x20040..0x20080
14// EPILOGUE is in range 0x20080..0x200c0
15// TX is in range 0x200c0..0x20100
16// NOTE is in range 0x20100..0x20140
17// ACCOUNT is in range 0x20140..0x20180
18// FOREIGN_ACCOUNT is in range 0x20180..0x201c0
19// FAUCET is in range 0x201c0..0x20200
20// FUNGIBLE_ASSET is in range 0x20200..0x20240
21// NON_FUNGIBLE_ASSET is in range 0x20240..0x20280
22// VAULT is in range 0x20280..0x202c0
23
24// TX KERNEL ERRORS
25// ================================================================================================
26
27/// Provided kernel procedure offset is out of bounds
28pub const ERR_KERNEL_PROCEDURE_OFFSET_OUT_OF_BOUNDS: u32 = 0x20000;
29
30/// Existing accounts must have a non-zero nonce
31pub const ERR_PROLOGUE_EXISTING_ACCOUNT_MUST_HAVE_NON_ZERO_NONCE: u32 = 0x20040;
32/// The provided global inputs do not match the block commitment
33pub const ERR_PROLOGUE_GLOBAL_INPUTS_PROVIDED_DO_NOT_MATCH_BLOCK_COMMITMENT: u32 = 0x20041;
34/// The provided global inputs do not match the block number commitment
35pub const ERR_PROLOGUE_GLOBAL_INPUTS_PROVIDED_DO_NOT_MATCH_BLOCK_NUMBER_COMMITMENT: u32 = 0x20042;
36/// Note commitment computed from the input note data does not match given note commitment
37pub const ERR_PROLOGUE_INPUT_NOTES_COMMITMENT_MISMATCH: u32 = 0x20043;
38/// Account IDs provided via global inputs and advice provider do not match
39pub const ERR_PROLOGUE_MISMATCH_OF_ACCOUNT_IDS_FROM_GLOBAL_INPUTS_AND_ADVICE_PROVIDER: u32 = 0x20044;
40/// Reference block MMR and note's authentication MMR must match
41pub const ERR_PROLOGUE_MISMATCH_OF_REFERENCE_BLOCK_MMR_AND_NOTE_AUTHENTICATION_MMR: u32 = 0x20045;
42/// New account must have a zero nonce
43pub const ERR_PROLOGUE_NEW_ACCOUNT_NONCE_MUST_BE_ZERO: u32 = 0x20046;
44/// New account must have an empty vault
45pub const ERR_PROLOGUE_NEW_ACCOUNT_VAULT_MUST_BE_EMPTY: u32 = 0x20047;
46/// Reserved slot for new fungible faucet has an invalid type
47pub const ERR_PROLOGUE_NEW_FUNGIBLE_FAUCET_RESERVED_SLOT_INVALID_TYPE: u32 = 0x20048;
48/// Reserved slot for new fungible faucet is not empty
49pub const ERR_PROLOGUE_NEW_FUNGIBLE_FAUCET_RESERVED_SLOT_MUST_BE_EMPTY: u32 = 0x20049;
50/// Reserved slot for new non-fungible faucet has an invalid type
51pub const ERR_PROLOGUE_NEW_NON_FUNGIBLE_FAUCET_RESERVED_SLOT_INVALID_TYPE: u32 = 0x2004a;
52/// Reserved slot for non-fungible faucet is not a valid empty SMT
53pub const ERR_PROLOGUE_NEW_NON_FUNGIBLE_FAUCET_RESERVED_SLOT_MUST_BE_VALID_EMPY_SMT: u32 = 0x2004b;
54/// Number of input notes exceeds the kernel's maximum limit of 1024
55pub const ERR_PROLOGUE_NUMBER_OF_INPUT_NOTES_EXCEEDS_LIMIT: u32 = 0x2004c;
56/// Number of note assets exceeds the maximum limit of 256
57pub const ERR_PROLOGUE_NUMBER_OF_NOTE_ASSETS_EXCEEDS_LIMIT: u32 = 0x2004d;
58/// Number of note inputs exceeded the maximum limit of 128
59pub const ERR_PROLOGUE_NUMBER_OF_NOTE_INPUTS_EXCEEDED_LIMIT: u32 = 0x2004e;
60/// Account data provided does not match the commitment recorded on-chain
61pub const ERR_PROLOGUE_PROVIDED_ACCOUNT_DATA_DOES_NOT_MATCH_ON_CHAIN_COMMITMENT: u32 = 0x2004f;
62/// Provided info about assets of an input does not match its commitment
63pub const ERR_PROLOGUE_PROVIDED_INPUT_ASSETS_INFO_DOES_NOT_MATCH_ITS_COMMITMENT: u32 = 0x20050;
64
65/// Total number of assets in the account and all involved notes must stay the same
66pub const ERR_EPILOGUE_TOTAL_NUMBER_OF_ASSETS_MUST_STAY_THE_SAME: u32 = 0x20080;
67
68/// Transaction expiration block delta must be within 0x1 and 0xFFFF.
69pub const ERR_TX_INVALID_EXPIRATION_DELTA: u32 = 0x200c0;
70/// Number of output notes in the transaction exceeds the maximum limit of 1024
71pub const ERR_TX_NUMBER_OF_OUTPUT_NOTES_EXCEEDS_LIMIT: u32 = 0x200c1;
72/// The transaction script is missing.
73pub const ERR_TX_TRANSACTION_SCRIPT_IS_MISSING: u32 = 0x200c2;
74
75/// Attempted to access note assets from incorrect context
76pub const ERR_NOTE_ATTEMPT_TO_ACCESS_NOTE_ASSETS_FROM_INCORRECT_CONTEXT: u32 = 0x20100;
77/// Attempted to access note inputs from incorrect context
78pub const ERR_NOTE_ATTEMPT_TO_ACCESS_NOTE_INPUTS_FROM_INCORRECT_CONTEXT: u32 = 0x20101;
79/// Attempted to access note sender from incorrect context
80pub const ERR_NOTE_ATTEMPT_TO_ACCESS_NOTE_SENDER_FROM_INCORRECT_CONTEXT: u32 = 0x20102;
81/// Note data does not match the commitment
82pub const ERR_NOTE_DATA_DOES_NOT_MATCH_COMMITMENT: u32 = 0x20103;
83/// Adding a fungible asset to a note cannot exceed the max_amount of 9223372036854775807
84pub const ERR_NOTE_FUNGIBLE_MAX_AMOUNT_EXCEEDED: u32 = 0x20104;
85/// Failed to find note at the given index; index must be within [0, num_of_notes]
86pub const ERR_NOTE_INVALID_INDEX: u32 = 0x20105;
87/// Invalid note type for the given note tag prefix
88pub const ERR_NOTE_INVALID_NOTE_TYPE_FOR_NOTE_TAG_PREFIX: u32 = 0x20106;
89/// Invalid note type
90pub const ERR_NOTE_INVALID_TYPE: u32 = 0x20107;
91/// Number of assets in a note exceed 255
92pub const ERR_NOTE_NUM_OF_ASSETS_EXCEED_LIMIT: u32 = 0x20108;
93/// The note's tag must fit into a u32 so the 32 most significant bits must be zero.
94pub const ERR_NOTE_TAG_MUST_BE_U32: u32 = 0x20109;
95
96/// Anchor block commitment must not be empty
97pub const ERR_ACCOUNT_ANCHOR_BLOCK_COMMITMENT_MUST_NOT_BE_EMPTY: u32 = 0x20140;
98/// Computed account code commitment does not match recorded account code commitment
99pub const ERR_ACCOUNT_CODE_COMMITMENT_MISMATCH: u32 = 0x20141;
100/// Account code must be updatable for it to be possible to set new code
101pub const ERR_ACCOUNT_CODE_IS_NOT_UPDATABLE: u32 = 0x20142;
102/// Epoch must be less than u16::MAX (0xffff).
103pub const ERR_ACCOUNT_ID_EPOCH_MUST_BE_LESS_THAN_U16_MAX: u32 = 0x20143;
104/// Least significant byte of the account ID suffix must be zero.
105pub const ERR_ACCOUNT_ID_LEAST_SIGNIFICANT_BYTE_MUST_BE_ZERO: u32 = 0x20144;
106/// Unknown account storage mode in account ID.
107pub const ERR_ACCOUNT_ID_UNKNOWN_STORAGE_MODE: u32 = 0x20145;
108/// Unknown version in account ID.
109pub const ERR_ACCOUNT_ID_UNKNOWN_VERSION: u32 = 0x20146;
110/// Storage offset is invalid for 0 storage size (should be 0)
111pub const ERR_ACCOUNT_INVALID_STORAGE_OFFSET_FOR_SIZE: u32 = 0x20147;
112/// The current account is not native
113pub const ERR_ACCOUNT_IS_NOT_NATIVE: u32 = 0x20148;
114/// Account nonce did not increase after a state changing transaction
115pub const ERR_ACCOUNT_NONCE_DID_NOT_INCREASE_AFTER_STATE_CHANGE: u32 = 0x20149;
116/// Account nonce cannot be increased by a greater than u32 value
117pub const ERR_ACCOUNT_NONCE_INCREASE_MUST_BE_U32: u32 = 0x2014a;
118/// Provided procedure index is out of bounds
119pub const ERR_ACCOUNT_PROC_INDEX_OUT_OF_BOUNDS: u32 = 0x2014b;
120/// Account procedure is not part of the account code
121pub const ERR_ACCOUNT_PROC_NOT_PART_OF_ACCOUNT_CODE: u32 = 0x2014c;
122/// Failed to read an account map item from a non-map storage slot
123pub const ERR_ACCOUNT_READING_MAP_VALUE_FROM_NON_MAP_SLOT: u32 = 0x2014d;
124/// ID of the new account does not match the ID computed from the seed and anchor block commitment
125pub const ERR_ACCOUNT_SEED_ANCHOR_BLOCK_COMMITMENT_DIGEST_MISMATCH: u32 = 0x2014e;
126/// Failed to write an account map item to a non-map storage slot
127pub const ERR_ACCOUNT_SETTING_MAP_ITEM_ON_NON_MAP_SLOT: u32 = 0x2014f;
128/// Failed to write an account value item to a non-value storage slot
129pub const ERR_ACCOUNT_SETTING_VALUE_ITEM_ON_NON_VALUE_SLOT: u32 = 0x20150;
130/// Computed account storage commitment does not match recorded account storage commitment
131pub const ERR_ACCOUNT_STORAGE_COMMITMENT_MISMATCH: u32 = 0x20151;
132/// Provided storage slot index is out of bounds
133pub const ERR_ACCOUNT_STORAGE_SLOT_INDEX_OUT_OF_BOUNDS: u32 = 0x20152;
134/// Number of account procedures exceeds the maximum limit of 256
135pub const ERR_ACCOUNT_TOO_MANY_PROCEDURES: u32 = 0x20153;
136/// Number of account storage slots exceeds the maximum limit of 255
137pub const ERR_ACCOUNT_TOO_MANY_STORAGE_SLOTS: u32 = 0x20154;
138/// Depth of the nested FPI calls exceeded 64
139pub const ERR_ACCOUNT_STACK_OVERFLOW: u32 = 0x20155;
140/// Failed to end foreign context because the current account is the native account
141pub const ERR_ACCOUNT_STACK_UNDERFLOW: u32 = 0x20156;
142
143/// Creation of a foreign context against the native account is forbidden
144pub const ERR_FOREIGN_ACCOUNT_CONTEXT_AGAINST_NATIVE_ACCOUNT: u32 = 0x20180;
145/// ID of the provided foreign account equals zero.
146pub const ERR_FOREIGN_ACCOUNT_ID_IS_ZERO: u32 = 0x20181;
147/// State of the current foreign account is invalid.
148pub const ERR_FOREIGN_ACCOUNT_INVALID: u32 = 0x20182;
149/// Maximum allowed number of foreign account to be loaded (64) was exceeded.
150pub const ERR_FOREIGN_ACCOUNT_MAX_NUMBER_EXCEEDED: u32 = 0x20183;
151
152/// Asset amount to burn can not exceed the existing total supply
153pub const ERR_FAUCET_BURN_CANNOT_EXCEED_EXISTING_TOTAL_SUPPLY: u32 = 0x201c0;
154/// The burn_non_fungible_asset procedure can only be called on a non-fungible faucet
155pub const ERR_FAUCET_BURN_NON_FUNGIBLE_ASSET_CAN_ONLY_BE_CALLED_ON_NON_FUNGIBLE_FAUCET: u32 = 0x201c1;
156/// Storage offset is invalid for a faucet account (0 is prohibited as it is the reserved data slot for faucets)
157pub const ERR_FAUCET_INVALID_STORAGE_OFFSET: u32 = 0x201c2;
158/// The faucet_is_non_fungible_asset_issued procedure can only be called on a non-fungible faucet
159pub const ERR_FAUCET_IS_NF_ASSET_ISSUED_PROC_CAN_ONLY_BE_CALLED_ON_NON_FUNGIBLE_FAUCET: u32 = 0x201c3;
160/// Asset mint operation would cause the new total supply to exceed the maximum allowed asset amount
161pub const ERR_FAUCET_NEW_TOTAL_SUPPLY_WOULD_EXCEED_MAX_ASSET_AMOUNT: u32 = 0x201c4;
162/// Failed to mint new non-fungible asset because it was already issued
163pub const ERR_FAUCET_NON_FUNGIBLE_ASSET_ALREADY_ISSUED: u32 = 0x201c5;
164/// Failed to burn non-existent non-fungible asset in the vault
165pub const ERR_FAUCET_NON_FUNGIBLE_ASSET_TO_BURN_NOT_FOUND: u32 = 0x201c6;
166/// For faucets the FAUCET_STORAGE_DATA_SLOT storage slot is reserved and can not be used with set_account_item
167pub const ERR_FAUCET_STORAGE_DATA_SLOT_IS_RESERVED: u32 = 0x201c7;
168/// The faucet_get_total_fungible_asset_issuance procedure can only be called on a fungible faucet
169pub const ERR_FAUCET_TOTAL_ISSUANCE_PROC_CAN_ONLY_BE_CALLED_ON_FUNGIBLE_FAUCET: u32 = 0x201c8;
170
171/// Fungible asset build operation called with amount that exceeds the maximum allowed asset amount
172pub const ERR_FUNGIBLE_ASSET_AMOUNT_EXCEEDS_MAX_ALLOWED_AMOUNT: u32 = 0x20200;
173/// Distribute would cause the maximum supply to be exceeded
174pub const ERR_FUNGIBLE_ASSET_DISTRIBUTE_WOULD_CAUSE_MAX_SUPPLY_TO_BE_EXCEEDED: u32 = 0x20201;
175/// The origin of the fungible asset is not this faucet
176pub const ERR_FUNGIBLE_ASSET_FAUCET_IS_NOT_ORIGIN: u32 = 0x20202;
177/// Malformed fungible asset: `ASSET[1]` must be 0
178pub const ERR_FUNGIBLE_ASSET_FORMAT_ELEMENT_ONE_MUST_BE_ZERO: u32 = 0x20203;
179/// Malformed fungible asset: `ASSET[2]` and `ASSET[3]` must be a valid fungible faucet id
180pub const ERR_FUNGIBLE_ASSET_FORMAT_ELEMENT_TWO_AND_THREE_MUST_BE_FUNGIBLE_FAUCET_ID: u32 = 0x20204;
181/// Malformed fungible asset: `ASSET[0]` exceeds the maximum allowed amount
182pub const ERR_FUNGIBLE_ASSET_FORMAT_ELEMENT_ZERO_MUST_BE_WITHIN_LIMITS: u32 = 0x20205;
183/// Failed to build the fungible asset because the provided faucet id is not from a fungible faucet
184pub const ERR_FUNGIBLE_ASSET_PROVIDED_FAUCET_ID_IS_INVALID: u32 = 0x20206;
185
186/// Non-fungible asset that already exists in the note cannot be added again
187pub const ERR_NON_FUNGIBLE_ASSET_ALREADY_EXISTS: u32 = 0x20240;
188/// The origin of the non-fungible asset is not this faucet
189pub const ERR_NON_FUNGIBLE_ASSET_FAUCET_IS_NOT_ORIGIN: u32 = 0x20241;
190/// Malformed non-fungible asset: `ASSET[3]` is not a valid non-fungible faucet id
191pub const ERR_NON_FUNGIBLE_ASSET_FORMAT_ELEMENT_THREE_MUST_BE_FUNGIBLE_FAUCET_ID: u32 = 0x20242;
192/// Malformed non-fungible asset: the most significant bit must be 0
193pub const ERR_NON_FUNGIBLE_ASSET_FORMAT_MOST_SIGNIFICANT_BIT_MUST_BE_ZERO: u32 = 0x20243;
194/// Failed to build the non-fungible asset because the provided faucet id is not from a non-fungible faucet
195pub const ERR_NON_FUNGIBLE_ASSET_PROVIDED_FAUCET_ID_IS_INVALID: u32 = 0x20244;
196
197/// Failed to add fungible asset to the asset vault due to the initial value being invalid
198pub const ERR_VAULT_ADD_FUNGIBLE_ASSET_FAILED_INITIAL_VALUE_INVALID: u32 = 0x20280;
199/// Failed to remove the fungible asset from the vault since the amount of the asset in the vault is less than the amount to remove
200pub const ERR_VAULT_FUNGIBLE_ASSET_AMOUNT_LESS_THAN_AMOUNT_TO_WITHDRAW: u32 = 0x20281;
201/// Adding the fungible asset to the vault would exceed the max amount of 9223372036854775807
202pub const ERR_VAULT_FUNGIBLE_MAX_AMOUNT_EXCEEDED: u32 = 0x20282;
203/// The get_balance procedure can only be called on a fungible faucet
204pub const ERR_VAULT_GET_BALANCE_PROC_CAN_ONLY_BE_CALLED_ON_FUNGIBLE_FAUCET: u32 = 0x20283;
205/// The has_non_fungible_asset procedure can only be called on a non-fungible faucet
206pub const ERR_VAULT_HAS_NON_FUNGIBLE_ASSET_PROC_CAN_BE_CALLED_ONLY_WITH_NON_FUNGIBLE_ASSET: u32 = 0x20284;
207/// The non-fungible asset already exists in the asset vault
208pub const ERR_VAULT_NON_FUNGIBLE_ASSET_ALREADY_EXISTS: u32 = 0x20285;
209/// Failed to remove non-existent non-fungible asset from the vault
210pub const ERR_VAULT_NON_FUNGIBLE_ASSET_TO_REMOVE_NOT_FOUND: u32 = 0x20286;
211/// Failed to remove fungible asset from the asset vault due to the initial value being invalid
212pub const ERR_VAULT_REMOVE_FUNGIBLE_ASSET_FAILED_INITIAL_VALUE_INVALID: u32 = 0x20287;
213
214pub const TX_KERNEL_ERRORS: [(u32, &str); 88] = [
215    (ERR_KERNEL_PROCEDURE_OFFSET_OUT_OF_BOUNDS, "Provided kernel procedure offset is out of bounds"),
216
217    (ERR_PROLOGUE_EXISTING_ACCOUNT_MUST_HAVE_NON_ZERO_NONCE, "Existing accounts must have a non-zero nonce"),
218    (ERR_PROLOGUE_GLOBAL_INPUTS_PROVIDED_DO_NOT_MATCH_BLOCK_COMMITMENT, "The provided global inputs do not match the block commitment"),
219    (ERR_PROLOGUE_GLOBAL_INPUTS_PROVIDED_DO_NOT_MATCH_BLOCK_NUMBER_COMMITMENT, "The provided global inputs do not match the block number commitment"),
220    (ERR_PROLOGUE_INPUT_NOTES_COMMITMENT_MISMATCH, "Note commitment computed from the input note data does not match given note commitment"),
221    (ERR_PROLOGUE_MISMATCH_OF_ACCOUNT_IDS_FROM_GLOBAL_INPUTS_AND_ADVICE_PROVIDER, "Account IDs provided via global inputs and advice provider do not match"),
222    (ERR_PROLOGUE_MISMATCH_OF_REFERENCE_BLOCK_MMR_AND_NOTE_AUTHENTICATION_MMR, "Reference block MMR and note's authentication MMR must match"),
223    (ERR_PROLOGUE_NEW_ACCOUNT_NONCE_MUST_BE_ZERO, "New account must have a zero nonce"),
224    (ERR_PROLOGUE_NEW_ACCOUNT_VAULT_MUST_BE_EMPTY, "New account must have an empty vault"),
225    (ERR_PROLOGUE_NEW_FUNGIBLE_FAUCET_RESERVED_SLOT_INVALID_TYPE, "Reserved slot for new fungible faucet has an invalid type"),
226    (ERR_PROLOGUE_NEW_FUNGIBLE_FAUCET_RESERVED_SLOT_MUST_BE_EMPTY, "Reserved slot for new fungible faucet is not empty"),
227    (ERR_PROLOGUE_NEW_NON_FUNGIBLE_FAUCET_RESERVED_SLOT_INVALID_TYPE, "Reserved slot for new non-fungible faucet has an invalid type"),
228    (ERR_PROLOGUE_NEW_NON_FUNGIBLE_FAUCET_RESERVED_SLOT_MUST_BE_VALID_EMPY_SMT, "Reserved slot for non-fungible faucet is not a valid empty SMT"),
229    (ERR_PROLOGUE_NUMBER_OF_INPUT_NOTES_EXCEEDS_LIMIT, "Number of input notes exceeds the kernel's maximum limit of 1024"),
230    (ERR_PROLOGUE_NUMBER_OF_NOTE_ASSETS_EXCEEDS_LIMIT, "Number of note assets exceeds the maximum limit of 256"),
231    (ERR_PROLOGUE_NUMBER_OF_NOTE_INPUTS_EXCEEDED_LIMIT, "Number of note inputs exceeded the maximum limit of 128"),
232    (ERR_PROLOGUE_PROVIDED_ACCOUNT_DATA_DOES_NOT_MATCH_ON_CHAIN_COMMITMENT, "Account data provided does not match the commitment recorded on-chain"),
233    (ERR_PROLOGUE_PROVIDED_INPUT_ASSETS_INFO_DOES_NOT_MATCH_ITS_COMMITMENT, "Provided info about assets of an input does not match its commitment"),
234
235    (ERR_EPILOGUE_TOTAL_NUMBER_OF_ASSETS_MUST_STAY_THE_SAME, "Total number of assets in the account and all involved notes must stay the same"),
236
237    (ERR_TX_INVALID_EXPIRATION_DELTA, "Transaction expiration block delta must be within 0x1 and 0xFFFF."),
238    (ERR_TX_NUMBER_OF_OUTPUT_NOTES_EXCEEDS_LIMIT, "Number of output notes in the transaction exceeds the maximum limit of 1024"),
239    (ERR_TX_TRANSACTION_SCRIPT_IS_MISSING, "The transaction script is missing."),
240
241    (ERR_NOTE_ATTEMPT_TO_ACCESS_NOTE_ASSETS_FROM_INCORRECT_CONTEXT, "Attempted to access note assets from incorrect context"),
242    (ERR_NOTE_ATTEMPT_TO_ACCESS_NOTE_INPUTS_FROM_INCORRECT_CONTEXT, "Attempted to access note inputs from incorrect context"),
243    (ERR_NOTE_ATTEMPT_TO_ACCESS_NOTE_SENDER_FROM_INCORRECT_CONTEXT, "Attempted to access note sender from incorrect context"),
244    (ERR_NOTE_DATA_DOES_NOT_MATCH_COMMITMENT, "Note data does not match the commitment"),
245    (ERR_NOTE_FUNGIBLE_MAX_AMOUNT_EXCEEDED, "Adding a fungible asset to a note cannot exceed the max_amount of 9223372036854775807"),
246    (ERR_NOTE_INVALID_INDEX, "Failed to find note at the given index; index must be within [0, num_of_notes]"),
247    (ERR_NOTE_INVALID_NOTE_TYPE_FOR_NOTE_TAG_PREFIX, "Invalid note type for the given note tag prefix"),
248    (ERR_NOTE_INVALID_TYPE, "Invalid note type"),
249    (ERR_NOTE_NUM_OF_ASSETS_EXCEED_LIMIT, "Number of assets in a note exceed 255"),
250    (ERR_NOTE_TAG_MUST_BE_U32, "The note's tag must fit into a u32 so the 32 most significant bits must be zero."),
251
252    (ERR_ACCOUNT_ANCHOR_BLOCK_COMMITMENT_MUST_NOT_BE_EMPTY, "Anchor block commitment must not be empty"),
253    (ERR_ACCOUNT_CODE_COMMITMENT_MISMATCH, "Computed account code commitment does not match recorded account code commitment"),
254    (ERR_ACCOUNT_CODE_IS_NOT_UPDATABLE, "Account code must be updatable for it to be possible to set new code"),
255    (ERR_ACCOUNT_ID_EPOCH_MUST_BE_LESS_THAN_U16_MAX, "Epoch must be less than u16::MAX (0xffff)."),
256    (ERR_ACCOUNT_ID_LEAST_SIGNIFICANT_BYTE_MUST_BE_ZERO, "Least significant byte of the account ID suffix must be zero."),
257    (ERR_ACCOUNT_ID_UNKNOWN_STORAGE_MODE, "Unknown account storage mode in account ID."),
258    (ERR_ACCOUNT_ID_UNKNOWN_VERSION, "Unknown version in account ID."),
259    (ERR_ACCOUNT_INVALID_STORAGE_OFFSET_FOR_SIZE, "Storage offset is invalid for 0 storage size (should be 0)"),
260    (ERR_ACCOUNT_IS_NOT_NATIVE, "The current account is not native"),
261    (ERR_ACCOUNT_NONCE_DID_NOT_INCREASE_AFTER_STATE_CHANGE, "Account nonce did not increase after a state changing transaction"),
262    (ERR_ACCOUNT_NONCE_INCREASE_MUST_BE_U32, "Account nonce cannot be increased by a greater than u32 value"),
263    (ERR_ACCOUNT_PROC_INDEX_OUT_OF_BOUNDS, "Provided procedure index is out of bounds"),
264    (ERR_ACCOUNT_PROC_NOT_PART_OF_ACCOUNT_CODE, "Account procedure is not part of the account code"),
265    (ERR_ACCOUNT_READING_MAP_VALUE_FROM_NON_MAP_SLOT, "Failed to read an account map item from a non-map storage slot"),
266    (ERR_ACCOUNT_SEED_ANCHOR_BLOCK_COMMITMENT_DIGEST_MISMATCH, "ID of the new account does not match the ID computed from the seed and anchor block commitment"),
267    (ERR_ACCOUNT_SETTING_MAP_ITEM_ON_NON_MAP_SLOT, "Failed to write an account map item to a non-map storage slot"),
268    (ERR_ACCOUNT_SETTING_VALUE_ITEM_ON_NON_VALUE_SLOT, "Failed to write an account value item to a non-value storage slot"),
269    (ERR_ACCOUNT_STORAGE_COMMITMENT_MISMATCH, "Computed account storage commitment does not match recorded account storage commitment"),
270    (ERR_ACCOUNT_STORAGE_SLOT_INDEX_OUT_OF_BOUNDS, "Provided storage slot index is out of bounds"),
271    (ERR_ACCOUNT_TOO_MANY_PROCEDURES, "Number of account procedures exceeds the maximum limit of 256"),
272    (ERR_ACCOUNT_TOO_MANY_STORAGE_SLOTS, "Number of account storage slots exceeds the maximum limit of 255"),
273    (ERR_ACCOUNT_STACK_OVERFLOW, "Depth of the nested FPI calls exceeded 64"),
274    (ERR_ACCOUNT_STACK_UNDERFLOW, "Failed to end foreign context because the current account is the native account"),
275
276    (ERR_FOREIGN_ACCOUNT_CONTEXT_AGAINST_NATIVE_ACCOUNT, "Creation of a foreign context against the native account is forbidden"),
277    (ERR_FOREIGN_ACCOUNT_ID_IS_ZERO, "ID of the provided foreign account equals zero."),
278    (ERR_FOREIGN_ACCOUNT_INVALID, "State of the current foreign account is invalid."),
279    (ERR_FOREIGN_ACCOUNT_MAX_NUMBER_EXCEEDED, "Maximum allowed number of foreign account to be loaded (64) was exceeded."),
280
281    (ERR_FAUCET_BURN_CANNOT_EXCEED_EXISTING_TOTAL_SUPPLY, "Asset amount to burn can not exceed the existing total supply"),
282    (ERR_FAUCET_BURN_NON_FUNGIBLE_ASSET_CAN_ONLY_BE_CALLED_ON_NON_FUNGIBLE_FAUCET, "The burn_non_fungible_asset procedure can only be called on a non-fungible faucet"),
283    (ERR_FAUCET_INVALID_STORAGE_OFFSET, "Storage offset is invalid for a faucet account (0 is prohibited as it is the reserved data slot for faucets)"),
284    (ERR_FAUCET_IS_NF_ASSET_ISSUED_PROC_CAN_ONLY_BE_CALLED_ON_NON_FUNGIBLE_FAUCET, "The faucet_is_non_fungible_asset_issued procedure can only be called on a non-fungible faucet"),
285    (ERR_FAUCET_NEW_TOTAL_SUPPLY_WOULD_EXCEED_MAX_ASSET_AMOUNT, "Asset mint operation would cause the new total supply to exceed the maximum allowed asset amount"),
286    (ERR_FAUCET_NON_FUNGIBLE_ASSET_ALREADY_ISSUED, "Failed to mint new non-fungible asset because it was already issued"),
287    (ERR_FAUCET_NON_FUNGIBLE_ASSET_TO_BURN_NOT_FOUND, "Failed to burn non-existent non-fungible asset in the vault"),
288    (ERR_FAUCET_STORAGE_DATA_SLOT_IS_RESERVED, "For faucets the FAUCET_STORAGE_DATA_SLOT storage slot is reserved and can not be used with set_account_item"),
289    (ERR_FAUCET_TOTAL_ISSUANCE_PROC_CAN_ONLY_BE_CALLED_ON_FUNGIBLE_FAUCET, "The faucet_get_total_fungible_asset_issuance procedure can only be called on a fungible faucet"),
290
291    (ERR_FUNGIBLE_ASSET_AMOUNT_EXCEEDS_MAX_ALLOWED_AMOUNT, "Fungible asset build operation called with amount that exceeds the maximum allowed asset amount"),
292    (ERR_FUNGIBLE_ASSET_DISTRIBUTE_WOULD_CAUSE_MAX_SUPPLY_TO_BE_EXCEEDED, "Distribute would cause the maximum supply to be exceeded"),
293    (ERR_FUNGIBLE_ASSET_FAUCET_IS_NOT_ORIGIN, "The origin of the fungible asset is not this faucet"),
294    (ERR_FUNGIBLE_ASSET_FORMAT_ELEMENT_ONE_MUST_BE_ZERO, "Malformed fungible asset: `ASSET[1]` must be 0"),
295    (ERR_FUNGIBLE_ASSET_FORMAT_ELEMENT_TWO_AND_THREE_MUST_BE_FUNGIBLE_FAUCET_ID, "Malformed fungible asset: `ASSET[2]` and `ASSET[3]` must be a valid fungible faucet id"),
296    (ERR_FUNGIBLE_ASSET_FORMAT_ELEMENT_ZERO_MUST_BE_WITHIN_LIMITS, "Malformed fungible asset: `ASSET[0]` exceeds the maximum allowed amount"),
297    (ERR_FUNGIBLE_ASSET_PROVIDED_FAUCET_ID_IS_INVALID, "Failed to build the fungible asset because the provided faucet id is not from a fungible faucet"),
298
299    (ERR_NON_FUNGIBLE_ASSET_ALREADY_EXISTS, "Non-fungible asset that already exists in the note cannot be added again"),
300    (ERR_NON_FUNGIBLE_ASSET_FAUCET_IS_NOT_ORIGIN, "The origin of the non-fungible asset is not this faucet"),
301    (ERR_NON_FUNGIBLE_ASSET_FORMAT_ELEMENT_THREE_MUST_BE_FUNGIBLE_FAUCET_ID, "Malformed non-fungible asset: `ASSET[3]` is not a valid non-fungible faucet id"),
302    (ERR_NON_FUNGIBLE_ASSET_FORMAT_MOST_SIGNIFICANT_BIT_MUST_BE_ZERO, "Malformed non-fungible asset: the most significant bit must be 0"),
303    (ERR_NON_FUNGIBLE_ASSET_PROVIDED_FAUCET_ID_IS_INVALID, "Failed to build the non-fungible asset because the provided faucet id is not from a non-fungible faucet"),
304
305    (ERR_VAULT_ADD_FUNGIBLE_ASSET_FAILED_INITIAL_VALUE_INVALID, "Failed to add fungible asset to the asset vault due to the initial value being invalid"),
306    (ERR_VAULT_FUNGIBLE_ASSET_AMOUNT_LESS_THAN_AMOUNT_TO_WITHDRAW, "Failed to remove the fungible asset from the vault since the amount of the asset in the vault is less than the amount to remove"),
307    (ERR_VAULT_FUNGIBLE_MAX_AMOUNT_EXCEEDED, "Adding the fungible asset to the vault would exceed the max amount of 9223372036854775807"),
308    (ERR_VAULT_GET_BALANCE_PROC_CAN_ONLY_BE_CALLED_ON_FUNGIBLE_FAUCET, "The get_balance procedure can only be called on a fungible faucet"),
309    (ERR_VAULT_HAS_NON_FUNGIBLE_ASSET_PROC_CAN_BE_CALLED_ONLY_WITH_NON_FUNGIBLE_ASSET, "The has_non_fungible_asset procedure can only be called on a non-fungible faucet"),
310    (ERR_VAULT_NON_FUNGIBLE_ASSET_ALREADY_EXISTS, "The non-fungible asset already exists in the asset vault"),
311    (ERR_VAULT_NON_FUNGIBLE_ASSET_TO_REMOVE_NOT_FOUND, "Failed to remove non-existent non-fungible asset from the vault"),
312    (ERR_VAULT_REMOVE_FUNGIBLE_ASSET_FAILED_INITIAL_VALUE_INVALID, "Failed to remove fungible asset from the asset vault due to the initial value being invalid"),
313];